Skip to content

Merge pull request #318 from furkatgofurov7/bump-golang-1-26-3 #31

Merge pull request #318 from furkatgofurov7/bump-golang-1-26-3

Merge pull request #318 from furkatgofurov7/bump-golang-1-26-3 #31

Workflow file for this run

name: Release Tag (goreleaser and container image)
on:
push:
tags:
- "*"
jobs:
goreleaser:
runs-on: ubuntu-latest
permissions:
packages: write
id-token: write
contents: write
attestations: write
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0
persist-credentials: false
- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
cache: false
- uses: sigstore/cosign-installer@6f9f17788090df1f26f669e9d70d6ae9567deba6 # v4.1.2
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@5daf1e915a5f0af01ddbcd89a43b8061ff4f1a89 # v7.2.2
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
docker-image:
runs-on: ubuntu-latest
permissions:
packages: write
id-token: write
attestations: write
artifact-metadata: write
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0
persist-credentials: false
- name: Setup QEMU
uses: docker/setup-qemu-action@06116385d9baf250c9f4dcb4858b16962ea869c3 # v4.1.0
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
- name: Log in to the Container registry
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
with:
REGISTRY: ${{ vars.registry || 'ghcr.io' }}
username: ${{ vars.username || github.actor }}
password: ${{ secrets.IMAGE_REPO_PASSWORD || secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@80c7e94dd9b9319bd5eb7a0e0fe9291e23a2a2e9 # v6.1.0
- name: Build and push
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0
id: build-push
with:
context: .
file: package/Dockerfile
build-args: |
PROJECT_PATH=github.com/${{ github.repository }}
VERSION=${{ github.ref_name }}
TAG=${{ github.ref_name }}
platforms: "linux/amd64,linux/arm64,linux/s390x"
push: true
provenance: true
tags: ghcr.io/${{ github.repository }}:${{ github.ref_name }}
labels: ${{ steps.meta.outputs.labels }}
- name: Generate artifact attestation
uses: actions/attest@59d89421af93a897026c735860bf21b6eb4f7b26 # v4.1.0
with:
subject-name: ghcr.io/${{ github.repository }}
subject-digest: ${{ steps.build-push.outputs.digest }}
push-to-registry: true