Skip to content

Commit

Permalink
Add check for manifest.json changes before continuing workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
imigueldiaz committed Mar 28, 2024
1 parent 1290db5 commit 528a259
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/firefox-addon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,22 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Check if manifest.json has changed
id: check-manifest
run: |
CHANGED_FILES=$(git diff --name-only HEAD^ HEAD)
if ! echo "$CHANGED_FILES" | grep -q "manifest.json"; then
echo "manifest.json has not changed, exiting gracefully"
echo "::set-output name=manifest_changed::false"
else
echo "manifest.json has changed, continuing with the workflow"
echo "::set-output name=manifest_changed::true"
fi
- name: Exit if manifest.json hasn't changed
if: ${{ steps.check-manifest.outputs.manifest_changed == 'false' }}
run: exit 0

- name: Setup Node.js
uses: actions/setup-node@v2
with:
Expand Down

0 comments on commit 528a259

Please sign in to comment.