Skip to content

Merge pull request #61 from stackitcloud/bugfix/zonerepo-use-sakey #10

Merge pull request #61 from stackitcloud/bugfix/zonerepo-use-sakey

Merge pull request #61 from stackitcloud/bugfix/zonerepo-use-sakey #10

Workflow file for this run

name: Release
on:
push:
tags:
- "*"
permissions: read-all
jobs:
release:
permissions:
id-token: write
packages: write
contents: write
runs-on: ubuntu-latest
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Git Fetch
run: git fetch --force --tags
- name: Setup go
uses: actions/setup-go@v5
with:
go-version: stable
- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- uses: sigstore/cosign-installer@dc72c7d5c4d10cd6bcb8cf6e3fd625a9e5e537da # v3.7.0
- uses: anchore/sbom-action/download-syft@55dc4ee22412511ee8c3142cbea40418e6cec693 # v0.17.8
- name: Set Up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set up Cosign
uses: sigstore/[email protected]
- name: Login to Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Release with Goreleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COSIGN_PRIVATE_KEY: ${{secrets.COSIGN_PRIVATE_KEY}}
COSIGN_PASSWORD: ${{secrets.COSIGN_KEY_PASSWORD}}