Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(helm): publish OCI helm charts #4894

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion .github/workflows/release-chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ permissions: {}
jobs:
release:
permissions:
contents: write # to push chart release and create a release (helm/chart-releaser-action)
contents: write # to push chart release and create a release (helm/chart-releaser-action)
packages: write # needed for ghcr access

if: github.repository == 'kubernetes-sigs/external-dns'
runs-on: ubuntu-latest
Expand Down Expand Up @@ -63,3 +64,22 @@ jobs:
CR_RELEASE_NAME_TEMPLATE: "external-dns-helm-chart-{{ .Version }}"
CR_RELEASE_NOTES_FILE: RELEASE.md
CR_MAKE_RELEASE_LATEST: false

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push charts to GHCR
run: |
lowercase=$(echo "${GITHUB_REPOSITORY_OWNER}" | tr '[:upper:]' '[:lower:]')
shopt -s nullglob
for pkg in .cr-release-packages/*; do
if [ -z "${pkg:-}" ]; then
break
fi
echo "Pushing package - ${pkg} to ghcr.io repository - ${lowercase}"
helm push "${pkg}" "oci://ghcr.io/${lowercase}/charts"
done