HACK: update release workflow for fork #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
GO111MODULE: on | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
steps: | |
- name: Checkout Source | |
uses: actions/checkout@v4 | |
- name: Unshallow | |
run: git fetch --prune --unshallow | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22.5' | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Generate SBOM | |
uses: CycloneDX/gh-gomod-generate-sbom@v2 | |
with: | |
version: v1 | |
args: mod -licenses -json -output bom.json | |
- name: Docker meta | |
uses: docker/metadata-action@v5 | |
id: meta | |
with: | |
images: ghcr.io/${{ github.repository_owner }}/gosec | |
flavor: | | |
latest=true | |
tags: | | |
type=sha,format=long | |
type=semver,pattern={{version}} | |
- name: Release Docker Image | |
uses: docker/build-push-action@v6 | |
id: relimage | |
with: | |
platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/ppc64le | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
push: true | |
build-args: GO_VERSION=1.22 |