generated from falcosecurity/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 284
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Fabian Zimmermann
committed
Feb 23, 2024
1 parent
1b539f7
commit 1b3cc3c
Showing
1 changed file
with
4 additions
and
42 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,63 +3,25 @@ name: Release Charts | |
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
paths: | ||
- "charts/**" | ||
- issue-632 | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
packages: write | ||
id-token: write | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install Cosign | ||
uses: sigstore/cosign-installer@e1523de7571e31dbe865fd2e80c5c7c23ae71eb4 # v3.4.0 | ||
|
||
- name: Configure Git | ||
run: | | ||
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "[email protected]" | ||
- name: Set up Helm | ||
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5 | ||
|
||
- name: Add dependency chart repos | ||
run: | | ||
helm repo add falcosecurity https://falcosecurity.github.io/charts | ||
- name: Run chart-releaser | ||
uses: helm/chart-releaser-action@a917fd15b20e8b64b94d9158ad54cd6345335584 # v1.6.0 | ||
with: | ||
charts_dir: charts | ||
uses: helm/[email protected] | ||
env: | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Publish and Sign OCI Charts | ||
run: | | ||
for chart in `find .cr-release-packages -name '*.tgz' -print`; do | ||
helm push ${chart} oci://ghcr.io/${GITHUB_REPOSITORY} |& tee helm-push-output.log | ||
file_name=${chart##*/} | ||
chart_name=${file_name%-*} | ||
digest=$(awk -F "[, ]+" '/Digest/{print $NF}' < helm-push-output.log) | ||
cosign sign "ghcr.io/${GITHUB_REPOSITORY}/${chart_name}@${digest}" | ||
done | ||
env: | ||
COSIGN_YES: true |