-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: Add workflow to check daily if there has been a new release.
- Loading branch information
1 parent
ea5e5c5
commit 485c958
Showing
2 changed files
with
34 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Check there is a new release available | ||
|
||
# RELEASE_STRING should be updated when a new release is available | ||
env: | ||
RELEASE_URL: 'https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads' | ||
RELEASE_STRING: 'Released: July 4, 2024' | ||
|
||
on: | ||
schedule: | ||
# Runs every day at 19:30 | ||
- cron: '30 19 * * *' | ||
push: | ||
# On push only when this file is changed | ||
branches: '*' | ||
paths: | ||
- ".github/workflows/check-new-release.yml" | ||
|
||
jobs: | ||
check-new-release: | ||
name: Check for a new release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: pip install requests | ||
- name: Check HTML to see if there is a new release | ||
shell: bash | ||
run: | | ||
python3 - << EOF | ||
import os, requests; | ||
html = requests.get(os.environ['RELEASE_URL']).text; | ||
string_exists = os.environ['RELEASE_STRING'] in html; | ||
exit(0 if string_exists else 1); | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters