feat: support searching task by url for GetTask and DeleteTask (#3607) #407
Workflow file for this run
This file contains hidden or 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* | |
permissions: | |
contents: read | |
jobs: | |
goreleaser: | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
outputs: | |
hashes: ${{ steps.hash.outputs.hashes }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
- name: Setup Go | |
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 | |
with: | |
go-version-file: go.mod | |
- name: Check GoReleaser config | |
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 | |
with: | |
version: latest | |
args: check | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 | |
id: run-goreleaser | |
with: | |
version: latest | |
args: release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Generate subject | |
id: hash | |
env: | |
ARTIFACTS: "${{ steps.run-goreleaser.outputs.artifacts }}" | |
run: | | |
set -euo pipefail | |
hashes=$(echo $ARTIFACTS | jq --raw-output '.[] | {name, "digest": (.extra.Digest // .extra.Checksum)} | select(.digest) | {digest} + {name} | join(" ") | sub("^sha256:";"")' | base64 -w0) | |
if test "$hashes" = ""; then # goreleaser < v1.13.0 | |
checksum_file=$(echo "$ARTIFACTS" | jq -r '.[] | select (.type=="Checksum") | .path') | |
hashes=$(cat $checksum_file | base64 -w0) | |
fi | |
echo "hashes=$hashes" >> $GITHUB_OUTPUT | |
- name: Set tag output | |
id: tag | |
run: echo "tag_name=${GITHUB_REF#refs/*/}" >> "$GITHUB_OUTPUT" | |
provenance: | |
needs: [goreleaser] | |
permissions: | |
actions: read # To read the workflow path. | |
id-token: write # To sign the provenance. | |
contents: write # To add assets to a release. | |
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v2.0.0 | |
with: | |
base64-subjects: "${{ needs.goreleaser.outputs.hashes }}" | |
upload-assets: true # upload to a new release | |
upload-tag-name: "${{ needs.release.outputs.tag_name }}" | |
draft-release: true |