Skip to content

Commit

Permalink
Do not fail workflow if no files change
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrabovsky committed Dec 6, 2021
1 parent b7a692c commit 5b08cce
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/upstream-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,20 @@ jobs:
token: ${{ secrets.ABRT_BOT_TOKEN }}

- name: Update translation files
id: update-translations
run: |
cp --verbose --preserve=all translations/* upstream/po/
# Fail if no files were changed.
[[ -z $(git -C upstream status --porcelain) ]] && \
echo 'No translation files changed' && \
exit 1
exit 0
echo 'Translation files updated'
echo '::set-output name=create-pr::1'
- name: Create pull request in upstream repository
if: ${{ steps.update-translations.outputs.create-pr }}
uses: peter-evans/create-pull-request@v3
with:
branch: translations-update
Expand Down

0 comments on commit 5b08cce

Please sign in to comment.