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