name: Release on: push: tags: - 'v*' jobs: docker: runs-on: ubuntu-latest steps: - uses: https://code.forgejo.org/actions/checkout@v4 with: fetch-depth: 0 - uses: https://code.forgejo.org/actions/setup-go@v5 with: go-version-file: go.mod - name: Extract version id: version run: echo "tag=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT" - name: Build and Push via Kaniko uses: graham/infra/.forgejo/actions/kaniko-build@main with: 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 ./... - name: Vet run: go vet ./...