Skip to content

Commit

Permalink
CI: Add workflow to check daily if there has been a new release.
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosperate committed Jul 16, 2024
1 parent ea5e5c5 commit 485c958
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 2 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/check-new-release.yml
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
3 changes: 1 addition & 2 deletions .github/workflows/check-urls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ on:
- cron: '30 19 * * *'

jobs:
# Test and check build errors
test-build:
check-urls:
name: Check file URLs
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit 485c958

Please sign in to comment.