Skip to content

Commit

Permalink
feat: add exit code to check changes action
Browse files Browse the repository at this point in the history
  • Loading branch information
mentlak0 committed Jul 21, 2023
1 parent 27656db commit a6bf015
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@ jobs:

- name: Get Chart.yaml version change
id: check-change
run: echo "changed_version=$(git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | grep charts/tekton-pipeline/Chart.yaml)" >> $GITHUB_OUTPUT

- name: Output changed file
run: |
for file in ${{ steps.check-change.outputs.changed_version }}; do
echo "$file was changed"
done
if git diff --name-only -r HEAD^1 HEAD | grep charts/tekton-pipeline/Chart.yaml; then
echo "changed_version=$(git diff --name-only -r HEAD^1 HEAD | grep charts/tekton-pipeline/Chart.yaml)" >> $GITHUB_OUTPUT
else
exit 1
fi
- uses: J12934/helm-gh-pages-action@master
if: steps.check-change.outputs.changed_version
Expand Down

0 comments on commit a6bf015

Please sign in to comment.