Skip to content
Merged
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
19 changes: 18 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ jobs:
packages: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0

- name: Set up QEMU
if: github.event_name != 'pull_request'
Expand Down Expand Up @@ -74,8 +76,23 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
build-args: VERSION=${{ github.ref_name }}

- name: Package and push Helm chart
- name: Check for chart changes
if: startsWith(github.ref, 'refs/tags/v')
id: chart-changes
run: |
PREV_TAG=$(git tag --sort=-v:refname | grep '^v' | sed -n '2p')
if [ -z "$PREV_TAG" ]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
exit 0
fi
if git diff --quiet "$PREV_TAG" -- charts/; then
echo "changed=false" >> "$GITHUB_OUTPUT"
else
echo "changed=true" >> "$GITHUB_OUTPUT"
fi

- name: Package and push Helm chart
if: startsWith(github.ref, 'refs/tags/v') && steps.chart-changes.outputs.changed == 'true'
run: |
TAG_VERSION="${GITHUB_REF_NAME#v}"
CHART_VERSION=$(yq '.version' charts/version-guard/Chart.yaml)
Expand Down
Loading