fix go version #23
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: Publish Kyverno Plugin | |
on: | |
push: | |
tags: | |
- 'kyverno-plugin-v*' | |
permissions: {} | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
publish-images: | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
id-token: write | |
outputs: | |
digest: ${{ steps.publish.outputs.digest }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | |
with: | |
go-version-file: plugins/kyverno/go.mod | |
cache-dependency-path: plugins/kyverno/go.sum | |
- name: Run Trivy vulnerability scanner in repo mode | |
uses: aquasecurity/trivy-action@6e7b7d1fd3e4fef0c5fa8cce1229c54b2c9bd0d8 # v0.24.0 | |
with: | |
scan-type: 'fs' | |
ignore-unfixed: true | |
format: 'sarif' | |
output: 'trivy-results.sarif' | |
severity: 'CRITICAL,HIGH' | |
- name: Install Cosign | |
uses: sigstore/cosign-installer@9614fae9e5c5eddabb09f90a270fcb487c9f7149 # v3.3.0 | |
- name: Set version | |
run: | | |
set -e | |
TAG=${{ github.ref_name }} | |
echo "VERSION=${TAG#kyverno-plugin-v}" >> $GITHUB_ENV | |
- name: Publish Kyverno Plugin | |
id: publish | |
uses: ./.github/actions/publish | |
with: | |
plugin: kyverno | |
name: policy-reporter/kyverno-plugin | |
registry-username: ${{ github.actor }} | |
registry-password: ${{ secrets.GITHUB_TOKEN }} | |
version: ${{ env.VERSION }} | |
sbom-name: kyverno-plugin | |
sbom-repository: ghcr.io/${{ github.repository_owner }}/sbom/policy-reporter | |
signature-repository: ghcr.io/${{ github.repository_owner }}/signatures/policy-reporter | |
generate-provenance: | |
needs: publish-images | |
permissions: | |
id-token: write # To sign the provenance. | |
packages: write # To upload assets to release. | |
actions: read # To read the workflow path. | |
# NOTE: The container generator workflow is not officially released as GA. | |
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected] | |
with: | |
image: ghcr.io/${{ github.repository_owner }}/policy-reporter/kyverno-plugin | |
digest: "${{ needs.publish-images.outputs.digest }}" | |
registry-username: ${{ github.actor }} | |
secrets: | |
registry-password: ${{ secrets.GITHUB_TOKEN }} |