Pull Data and Build #96290
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
# /.github/workflows/daily.yml | |
# based on https://github.com/carbonphyber/watch-epa-superfund-sites/blob/main/.github/workflows/daily.yml | |
on: | |
schedule: | |
- cron: '*/15 * * * *' # Every 15 minutes | |
name: Pull Data and Build | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Scrape | |
run: | | |
curl -o data/apple-security-updates-raw.html --no-progress-meter "https://support.apple.com/en-us/HT201222?ts=$(date +%s)" | |
- name: Commit new data | |
run: | | |
git config user.name github-actions | |
git config user.email [email protected] | |
git add data/ | |
if [[ -n "$(git status -s -- data/)" ]]; then | |
TIMESTAMP_NOW=`date -u +"%Y-%m-%dT%H:%M:%SZ"` | |
git commit -m "data scraped at $TIMESTAMP_NOW" | |
git push | |
fi |