diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index bd27b0f..2d9a7f9 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -3,6 +3,7 @@ name: publish on: push: branches: [main] + tags: ['v*'] env: REGISTRY: ghcr.io @@ -38,7 +39,7 @@ jobs: uses: docker/build-push-action@v7 with: context: . - push: true + push: ${{ startsWith(github.ref, 'refs/tags/') }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} @@ -67,6 +68,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Publish Helm chart to GHCR + if: startsWith(github.ref, 'refs/tags/') run: | helm package chart export CHART_VERSION=$(grep 'version:' ./chart/Chart.yaml | tail -n1 | awk '{ print $2 }')