-
Notifications
You must be signed in to change notification settings - Fork 17
33 lines (30 loc) · 928 Bytes
/
check-new-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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