fix ci
This commit is contained in:
1 parent
bbd8692bab
commit
f70f28839f
1 file changed
+9
-21
@@ -21,6 +21,7 @@ env:
|
|||||||
# when the toolchain is new enough (gofmt is part of the Go toolchain in 1.27).
|
# when the toolchain is new enough (gofmt is part of the Go toolchain in 1.27).
|
||||||
GO_VERSION: "1.27"
|
GO_VERSION: "1.27"
|
||||||
NODE_VERSION: "22"
|
NODE_VERSION: "22"
|
||||||
|
IMAGE: registry.k6n.net/fancydns
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
go:
|
go:
|
||||||
@@ -174,7 +175,7 @@ jobs:
|
|||||||
|
|
||||||
image:
|
image:
|
||||||
name: Container image
|
name: Container image
|
||||||
runs-on: ubuntu-latest
|
runs-on: amd64
|
||||||
needs: [binary]
|
needs: [binary]
|
||||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||||
permissions:
|
permissions:
|
||||||
@@ -183,24 +184,11 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- 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
|
- name: Push image
|
||||||
uses: docker/login-action@v3
|
run: |
|
||||||
with:
|
docker push $IMAGE:${{ gitea.sha }}
|
||||||
registry: ghcr.io
|
docker push $IMAGE:latest
|
||||||
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
|
|
||||||
Reference in new issue
Block a user