This commit is contained in:
mats committed 2026-09-27 16:30:16 +02:00
1 parent bbd8692bab
commit f70f28839f
1 file changed
+9 -21
+9 -21
View File
@@ -21,6 +21,7 @@ env:
# when the toolchain is new enough (gofmt is part of the Go toolchain in 1.27).
GO_VERSION: "1.27"
NODE_VERSION: "22"
IMAGE: registry.k6n.net/fancydns
jobs:
go:
@@ -174,7 +175,7 @@ jobs:
image:
name: Container image
runs-on: ubuntu-latest
runs-on: amd64
needs: [binary]
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
permissions:
@@ -183,24 +184,11 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- name: Build
run: |
docker build -t $IMAGE:${{ gitea.sha }} -t $IMAGE:latest .
- name: Log in to the registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:${{ github.sha }}
build-args: |
VERSION=${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Push image
run: |
docker push $IMAGE:${{ gitea.sha }}
docker push $IMAGE:latest