Skip to content

ci: add helm chart ext-blockfrost-operator publish script (#367) #1

ci: add helm chart ext-blockfrost-operator publish script (#367)

ci: add helm chart ext-blockfrost-operator publish script (#367) #1

name: publish-ext-blockfrost-operator-helm-chart
on:
push:
branches: ['main']
paths:
[
'charts/ext-blockfrost-operator/**',
'.github/workflows/publish-ext-blockfrost-operator-helm-chart.yml',
]
jobs:
build-and-push-ext-blockfrost-operator-helm-chart:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install Helm
uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2 # v5.0.0
- name: Package and upload chart
shell: bash
env:
REGISTRY: 'ghcr.io'
REPOSITORY: '${{ github.repository }}'
TOKEN: '${{ secrets.GITHUB_TOKEN }}'
USER: '${{ github.repository_owner }}'
run: |
rm -rf dist
mkdir dist
helm package charts/ext-blockfrost-operator/ -d dist/
echo "${TOKEN}" | helm registry login "${REGISTRY}" -u "${USER}" --password-stdin
for file in dist/*; do
helm push "$file" "oci://${REGISTRY}/${REPOSITORY,,}/charts"
done