Merge pull request #29 from JimBugwadia/main #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: releaser | |
permissions: {} | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
publish-images: | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
id-token: write | |
outputs: | |
image-digest: ${{ steps.publish-kyverno-notation-aws.outputs.digest }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
- name: Setup build env | |
uses: ./.github/actions/setup-build-env | |
with: | |
build-cache-key: publish-images | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run Trivy vulnerability scanner in repo mode | |
uses: aquasecurity/trivy-action@41f05d9ecffa2ed3f1580af306000f734b733e54 # v0.11.2 | |
with: | |
scan-type: 'fs' | |
ignore-unfixed: true | |
format: 'sarif' | |
output: 'trivy-results.sarif' | |
severity: 'CRITICAL,HIGH' | |
- name: Install Cosign | |
uses: sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06 # v3.1.1 | |
- name: Publish image | |
id: publish-kyverno-notation-aws | |
uses: ./.github/actions/publish-image | |
with: | |
makefile-target: docker-publish | |
registry: ghcr.io | |
registry-username: ${{ github.actor }} | |
registry-password: ${{ secrets.GITHUB_TOKEN }} | |
repository: ${{ github.repository_owner }} | |
version: ${{ github.ref_name }} | |
sign-image: true | |
sbom-name: kyverno-notation-aws | |
sbom-repository: ghcr.io/${{ github.repository }}/sbom | |
signature-repository: ghcr.io/${{ github.repository }}/signatures | |
main-path: ./ | |
generate-kyverno-notation-aws-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 }}/kyverno-notation-aws | |
digest: "${{ needs.publish-images.outputs.image-digest }}" | |
registry-username: ${{ github.actor }} | |
secrets: | |
registry-password: ${{ secrets.GITHUB_TOKEN }} | |
create-release: | |
runs-on: ubuntu-latest | |
needs: publish-images | |
permissions: | |
contents: write | |
id-token: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
- uses: creekorful/goreportcard-action@1f35ced8cdac2cba28c9a2f2288a16aacfd507f9 # v1.0 | |
- name: Install Cosign | |
uses: sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06 # v3.1.1 | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@336e29918d653399e599bfca99fadc1d7ffbc9f7 # v4.3.0 | |
with: | |
version: latest | |
args: release --rm-dist --debug --release-notes=release/release-notes.out | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |