-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
d80171a
commit ad0ed69
Showing
2 changed files
with
19 additions
and
46 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,4 +1,4 @@ | ||
name: Publish Helm Chart (GCR) | ||
name: Release Helm Chart | ||
|
||
on: | ||
release: | ||
|
@@ -13,26 +13,39 @@ jobs: | |
- name: Helm Installation | ||
uses: azure/[email protected] | ||
with: | ||
version: v3.7.0 | ||
version: v3.11.3 | ||
- name: Helm Repository Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
fetch-depth: 0 | ||
persist-credentials: true | ||
ref: master | ||
- name: Setup Env | ||
run: | | ||
CHART_VERSION=$(helm show chart . | grep "^version:" | awk '$1 { print $2 }') | ||
CHART_PACKAGE_NAME="remote-runner-$CHART_VERSION" | ||
echo "CHART_VERSION=$CHART_VERSION" >> "$GITHUB_ENV" | ||
echo "CHART_PACKAGE_NAME=$CHART_PACKAGE_NAME" >> "$GITHUB_ENV" | ||
- name: Helm Package (GCR) | ||
env: | ||
# experimental feature | ||
HELM_EXPERIMENTAL_OCI: 1 | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GCR_IMAGE: ghcr.io/${{ github.repository_owner }}/xlr-remote-runner-helm-chart | ||
run: | | ||
CHART_VERSION=$(helm show chart . | grep "^version:" | awk '$1 { print $2 }') | ||
CHART_PACKAGE_NAME="remote-runner-$CHART_VERSION" | ||
helm repo add bitnami https://charts.bitnami.com/bitnami | ||
helm repo update | ||
helm dependency update | ||
helm package . --version "$CHART_VERSION" -d build | ||
helm package . --version "${{ env.CHART_VERSION }}" -d build | ||
echo ${{ env.GITHUB_TOKEN }} | helm registry login ${{ env.GCR_IMAGE }} --username ${{ github.repository_owner }} --password-stdin | ||
helm push build/$CHART_PACKAGE_NAME.tgz oci://${{ env.GCR_IMAGE }} | ||
helm push build/${{ env.CHART_PACKAGE_NAME }}.tgz oci://${{ env.GCR_IMAGE }} | ||
- name: Upload Release Helm Chart | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: build/${{ env.CHART_PACKAGE_NAME }}.tgz | ||
asset_name: ${{ env.CHART_PACKAGE_NAME }}.tgz | ||
asset_content_type: application/gzip |