Skip to content

Commit

Permalink
Merge pull request #34 from DemocracyClub/raise-pr-for-update
Browse files Browse the repository at this point in the history
Raise PR for updates
  • Loading branch information
symroe authored Mar 16, 2024
2 parents e2d7870 + 4d88e0d commit 88e8482
Showing 1 changed file with 7 additions and 15 deletions.
22 changes: 7 additions & 15 deletions .github/workflows/check-for-bank-holiday-updates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,10 @@ jobs:
- name: Check for updates
run: |
set +e
python manage_bank_holidays.py --diff
if [[ $? -ne 0 ]]; then
echo "New bank holiday JSON is live"
curl \
-X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
https://api.github.com/repos/DemocracyClub/uk-election-timetables/issues \
-d '{"title":"Update bank-holidays.json from GOV.UK"}'
else
echo "bank-holidays.json is up to date"
fi
pip install requests
python manage_bank_holidays.py --update
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
commit-message: Update bank holidays
title: Update bank holidays

0 comments on commit 88e8482

Please sign in to comment.