Merge pull request #48 from linuxfoundation/jme/update-deps #21
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
| --- | |
| # Copyright The Linux Foundation and each contributor to LFX. | |
| # SPDX-License-Identifier: MIT | |
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| env: | |
| COSIGN_VERSION: v2.5.3 | |
| HELM_VERSION: v3.18.4 | |
| permissions: | |
| contents: read | |
| jobs: | |
| release-helm-chart: | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: write | |
| packages: write | |
| id-token: write | |
| outputs: | |
| digest: ${{ steps.publish-ghcr.outputs.digest }} | |
| image_name: ${{ steps.publish-ghcr.outputs.image_name }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
| - name: Prepare versions and chart name | |
| id: prepare | |
| run: | | |
| set -euo pipefail | |
| CHART_NAME="$(yq '.name' charts/*/Chart.yaml)" | |
| CHART_VERSION="$(yq '.version' charts/*/Chart.yaml)" | |
| { | |
| echo "chart_name=$CHART_NAME" | |
| echo "chart_version=$CHART_VERSION" | |
| } >> "$GITHUB_OUTPUT" | |
| - name: Publish Chart to GHCR | |
| id: publish-ghcr | |
| uses: linuxfoundation/lfx-public-workflows/.github/actions/helm-chart-oci-publisher@e619121ece4ca4b1d6c89ade032f26105505756d | |
| with: | |
| name: ${{ steps.prepare.outputs.chart_name }} | |
| repository: ${{ github.repository }}/chart | |
| chart_version: ${{ steps.prepare.outputs.chart_version }} | |
| registry: ghcr.io | |
| registry_username: ${{ github.actor }} | |
| registry_password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install Cosign | |
| uses: sigstore/cosign-installer@d58896d6a1865668819e1d91763c7751a165e159 # v3.9.2 | |
| with: | |
| cosign-release: "${{ env.COSIGN_VERSION }}" | |
| - name: Login to GitHub | |
| uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Sign the Helm chart in GHCR | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| set -euo pipefail | |
| cosign sign --yes '${{ steps.publish-ghcr.outputs.image_name }}@${{ steps.publish-ghcr.outputs.digest }}' | |
| create-ghcr-helm-provenance: | |
| needs: | |
| - release-helm-chart | |
| permissions: | |
| actions: read | |
| id-token: write | |
| packages: write | |
| uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected] | |
| with: | |
| image: ${{ needs.release-helm-chart.outputs.image_name }} | |
| digest: ${{ needs.release-helm-chart.outputs.digest }} | |
| registry-username: ${{ github.actor }} | |
| secrets: | |
| registry-password: ${{ secrets.GITHUB_TOKEN }} |