-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrate to storing helm charts inside the docker registry
- Loading branch information
Showing
2 changed files
with
49 additions
and
8 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 |
---|---|---|
@@ -1,10 +1,9 @@ | ||
name: Helm publish on new commit and new version | ||
name: Helm publish new version | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
- '!gh-pages' | ||
|
||
jobs: | ||
chart-publish: | ||
|
@@ -20,13 +19,33 @@ jobs: | |
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "[email protected]" | ||
- name: Helm Installation | ||
uses: azure/setup-helm@v3 | ||
- name: Set up Helm | ||
uses: azure/setup-helm@v4 | ||
with: | ||
version: v3.12.0 | ||
|
||
- name: Run chart-releaser for publish on new version | ||
if: github.ref == 'refs/heads/main' | ||
uses: helm/chart-releaser-action@main | ||
- name: Run chart-releaser | ||
uses: helm/[email protected] | ||
with: | ||
charts_dir: '.' | ||
charts_dir: . | ||
config: cr.yaml | ||
env: | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
CR_SKIP_EXISTING: "true" | ||
|
||
- name: Login to GHCR | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Push charts to GHCR | ||
run: | | ||
shopt -s nullglob | ||
for pkg in .cr-release-packages/*.tgz; do | ||
if [ -z "${pkg:-}" ]; then | ||
break | ||
fi | ||
helm push "${pkg}" "oci://ghcr.io/${GITHUB_REPOSITORY_OWNER}/geonetwork-helm-charts" | ||
done |
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