Skip to content

chore(deps): bump actions/checkout from 4 to 5 (#215) #2

chore(deps): bump actions/checkout from 4 to 5 (#215)

chore(deps): bump actions/checkout from 4 to 5 (#215) #2

name: publish-bind9-helm-chart
on:
push:
branches: ['main']
paths: ['charts/bind9/**','.github/workflows/publish-bind9-helm-chart.yml']
jobs:
build-and-push-bind9-helm-chart:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v5
- name: Install Helm
uses: azure/setup-helm@v4
- 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/bind9/ -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