2024-05-01 15:15:25 +00:00
|
|
|
name: build-container-image
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
docker:
|
|
|
|
runs-on: ubuntu-latest
|
2024-05-01 16:29:08 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
packages: write
|
2024-05-01 15:15:25 +00:00
|
|
|
steps:
|
2024-05-01 16:11:23 +00:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
env
|
2024-05-01 16:27:52 +00:00
|
|
|
echo actor: ${{ github.actor }}
|
|
|
|
echo token: ${{ github.token }}
|
2024-05-01 16:30:37 +00:00
|
|
|
echo secrets_token: ${{ secrets.GITHUB_TOKEN }}
|
2024-05-01 15:15:25 +00:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Login to Docker Hub
|
|
|
|
uses: docker/login-action@v3
|
|
|
|
with:
|
|
|
|
registry: forge.k3s.fr
|
2024-05-01 16:15:34 +00:00
|
|
|
username: ${{ github.actor }}
|
2024-05-01 16:30:37 +00:00
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
2024-05-01 15:15:25 +00:00
|
|
|
- name: Build and push
|
|
|
|
uses: docker/build-push-action@v5
|
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
push: true
|
2024-05-01 16:27:52 +00:00
|
|
|
tags: forge.k3s.fr/pocs/test-docker-build:latest
|