This commit is contained in:
parent
a25af9c7b3
commit
f0ecd9c2ce
1 changed files with 14 additions and 23 deletions
|
|
@ -17,34 +17,25 @@ jobs:
|
|||
with:
|
||||
go-version-file: go.mod
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: https://github.com/docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: https://github.com/docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to Container Registry
|
||||
uses: https://github.com/docker/login-action@v3
|
||||
with:
|
||||
registry: git.mcintire.me
|
||||
username: graham
|
||||
password: ${{ secrets.FORGEJO_TOKEN }}
|
||||
|
||||
- name: Extract version
|
||||
id: version
|
||||
run: echo "tag=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: https://github.com/docker/build-push-action@v6
|
||||
- name: Build and Push via Kaniko
|
||||
uses: graham/infra/.forgejo/actions/kaniko-build@main
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
build-args: |
|
||||
VERSION=${{ steps.version.outputs.tag }}
|
||||
tags: |
|
||||
git.mcintire.me/${{ github.repository }}:latest
|
||||
git.mcintire.me/${{ github.repository }}:${{ steps.version.outputs.tag }}
|
||||
token: ${{ secrets.FORGEJO_TOKEN }}
|
||||
image: git.mcintire.me/graham/towerops-agent
|
||||
tag: ${{ steps.version.outputs.tag }}
|
||||
extra_args: "--build-arg VERSION=${{ steps.version.outputs.tag }} --platform=linux/amd64 --platform=linux/arm64"
|
||||
|
||||
- name: Tag as latest
|
||||
uses: graham/infra/.forgejo/actions/kaniko-build@main
|
||||
with:
|
||||
token: ${{ secrets.FORGEJO_TOKEN }}
|
||||
image: git.mcintire.me/graham/towerops-agent
|
||||
tag: latest
|
||||
extra_args: ""
|
||||
|
||||
- name: Run tests
|
||||
run: go test -race -v -count=1 -timeout 60s ./...
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue