Skip to content

Commit

Permalink
Still working out how to skip steps
Browse files Browse the repository at this point in the history
  • Loading branch information
briandfoy committed Mar 16, 2023
1 parent f71e4b3 commit 380a195
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/update_range_message.yml
Expand Up @@ -6,6 +6,8 @@ on:
jobs:
update-ranges:
runs-on: ubuntu-latest
env:
RANGE_MESSAGES_SAME: 1
steps:
- uses: actions/checkout@v3
- name: setup packages
Expand All @@ -28,21 +30,21 @@ jobs:
continue-on-error: true
run: |
perl util/range_messages_differ.pl lib/Business/ISBN/RangeMessage.xml lib/Business/ISBN/RangeMessage.xml.new
echo "RANGE_MESSAGES_DIFFER=$?" >> $GITHUB_ENV
echo "RANGE_MESSAGES_SAME=$?" >> $GITHUB_ENV
- name: Update module data
id: update
if: ${{ env.RANGE_MESSAGES_DIFFER == 1 }}
if: ${{ env.RANGE_MESSAGES_SAME == 0 }}
run: |
mv lib/Business/ISBN/RangeMessage.xml.new lib/Business/ISBN/RangeMessage.xml
perl -Ilib examples/make_default_data.pl
perl -c lib/Business/ISBN/Data.pm
echo "UPDATE_FAILED=$?" >> $GITHUB_ENV
perl Makefile.PL
make test
- name: Commit RangeMessage.xml
id: commit
if: ${{ env.UPDATE_FAILED == 0 }}
if: ${{ env.RANGE_MESSAGES_SAME == 0 }}
continue-on-error: true
run: |
git diff --quiet HEAD
git diff
git add lib/Business/ISBN/RangeMessage.xml lib/Business/ISBN/Data.pm
git commit -m "Latest RangeMessage.xml" lib/Business/ISBN/RangeMessage.xml lib/Business/ISBN/Data.pm
git push origin master

0 comments on commit 380a195

Please sign in to comment.