Helm package and push to Github Pages #12
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: Helm package and push to ghcr.io | |
on: | |
# publish on releases, e.g. v2.1.13 (image tagged as "2.1.13" - "v" prefix is removed) | |
release: | |
types: [ published ] | |
# push: | |
# branches: | |
# - 'main' | |
# paths: | |
# - 'helm-chart/**' | |
# - '.github/workflows/helm-package-and-publish.yaml' | |
env: | |
REGISTRY: ghcr.io | |
jobs: | |
helm-package-and-push-to-ghcr-io: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install Helm | |
uses: azure/[email protected] | |
- name: Helm Package and Push to ghcr.io | |
run: | | |
RELEASE_TAG="${{ github.event.release.tag_name }}" | |
CLEAN_VERSION="${RELEASE_TAG#v}" | |
echo "RELEASE Version: $CLEAN_VERSION" | |
PACKAGE_OUTPUT=$(helm package --version "$CLEAN_VERSION" helm-chart) | |
echo "PACKAGE_OUTPUT=$PACKAGE_OUTPUT" | |
PACKAGE_NAME=$(basename "$PACKAGE_OUTPUT") | |
echo "Generated helm package: $PACKAGE_NAME" | |
echo ${{ secrets.GHCR_TOKEN }} | helm registry login ghcr.io/oguzhan-yilmaz/steampipe-powerpipe-kubernetes --username oguzhan-yilmaz --password-stdin | |
helm push "$PACKAGE_NAME" oci://ghcr.io/oguzhan-yilmaz |