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: 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 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 }} - name: Run tests run: go test -race -v -count=1 -timeout 60s ./... - name: Vet run: go vet ./...