Skip to content

Commit

Permalink
Push to ghcr only when the chart has changes (#400)
Browse files Browse the repository at this point in the history
Signed-off-by: Jongwoo Han <[email protected]>
  • Loading branch information
jongwooo authored Aug 26, 2024
1 parent 338d57f commit b4021b7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,21 @@ jobs:
helm repo add mongodb https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami
- name: Run chart-releaser
id: chart-releaser
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

- name: Login to GHCR
if: steps.chart-releaser.outputs.changed_charts
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push Charts to GHCR
if: steps.chart-releaser.outputs.changed_charts
run: |
for pkg in .cr-release-packages/*; do
if [ -z "${pkg:-}" ]; then
Expand Down

0 comments on commit b4021b7

Please sign in to comment.