chore: fix typo #3
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
--- | |
jobs: | |
goreleaser: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- run: git fetch --force --tags | |
- uses: actions/[email protected] | |
with: | |
cache: true | |
go-version: ">=1.20.2" | |
- uses: sigstore/[email protected] | |
with: | |
cosign-release: v2.0.0 | |
- uses: anchore/sbom-action/[email protected] | |
with: | |
syft-version: v0.69.0 | |
- id: import_gpg | |
uses: crazy-max/[email protected] | |
with: | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.PASSPHRASE }} | |
- env: | |
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | |
run: echo "$GPG_PRIVATE_KEY" > /home/runner/gpgkey.asc && chmod 600 /home/runner/gpgkey.asc | |
shell: bash | |
- uses: docker/[email protected] | |
with: | |
password: ${{ secrets.GH_PAT }} | |
registry: ghcr.io | |
username: mcornick | |
- env: | |
AUR_KEY: ${{ secrets.AUR_KEY }} | |
GITHUB_TOKEN: ${{ secrets.GH_PAT }} | |
MASTODON_ACCESS_TOKEN: ${{ secrets.MASTODON_ACCESS_TOKEN }} | |
MASTODON_CLIENT_ID: ${{ secrets.MASTODON_CLIENT_ID }} | |
MASTODON_CLIENT_SECRET: ${{ secrets.MASTODON_CLIENT_SECRET }} | |
id: goreleaser | |
uses: goreleaser/[email protected] | |
with: | |
args: release --clean | |
version: latest | |
- run: rm /home/runner/gpgkey.asc | |
shell: bash | |
- name: Generate binary hashes | |
id: binary | |
env: | |
ARTIFACTS: "${{ steps.goreleaser.outputs.artifacts }}" | |
run: |- | |
set -euo pipefail | |
checksum_file=$(echo "$ARTIFACTS" | jq -r '.[] | select (.type=="Checksum") | .path') | |
echo "hashes=$(cat $checksum_file | base64 -w0)" >> "$GITHUB_OUTPUT" | |
- name: Image digest | |
id: image | |
env: | |
ARTIFACTS: "${{ steps.goreleaser.outputs.artifacts }}" | |
run: |- | |
set -euo pipefail | |
image_and_digest=$(echo "$ARTIFACTS" | jq -r '.[] | select (.type=="Docker Manifest") | .path') | |
image=$(echo "${image_and_digest}" | cut -d'@' -f1 | cut -d':' -f1) | |
digest=$(echo "${image_and_digest}" | cut -d'@' -f2) | |
echo "name=$image" >> "$GITHUB_OUTPUT" | |
echo "digest=$digest" >> "$GITHUB_OUTPUT" | |
binary-provenance: | |
needs: [goreleaser] | |
permissions: | |
actions: read | |
id-token: write | |
contents: write | |
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected] | |
with: | |
base64-subjects: "${{ needs.goreleaser.outputs.hashes }}" | |
upload-assets: true | |
image-provenance: | |
needs: [goreleaser] | |
permissions: | |
actions: read | |
id-token: write | |
packages: write | |
secrets: | |
registry-password: ${{ secrets.GITHUB_TOKEN }} | |
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected] | |
with: | |
image: ${{ needs.goreleaser.outputs.image }} | |
digest: ${{ needs.goreleaser.outputs.digest }} | |
registry-username: ${{ github.actor }} | |
name: goreleaser | |
"on": | |
push: | |
tags: | |
- "*" | |
permissions: | |
contents: write | |
id-token: write | |
issues: write | |
packages: write | |
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json |