Nightly Screenshots from Jersey Met Office #210
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
name: Nightly Screenshots from Jersey Met Office | |
on: | |
schedule: | |
- cron: '15 2 * * *' | |
# on: | |
# push: | |
# branches: [ "main" ] | |
jobs: | |
take_screenshots: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: get-current-date | |
id: date | |
run: echo "current_date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV | |
- name: set-directory-with-date | |
id: destdir | |
run: echo "destdir=$(date +'%Y/%m-%B/met-office/%d')" >> $GITHUB_ENV | |
- name: verify-directory-exists | |
run: mkdir -p ${{ env.destdir }} | |
- name: screenshots-desktop-shipping-forecast | |
uses: swinton/[email protected] | |
with: | |
source: https://www.gov.je/weather/shipping/ | |
destination: ${{ env.current_date }}-shipping-forecast.png | |
full-page: true | |
delay: 1 | |
- name: screenshots-desktop-weather-forecast | |
uses: swinton/[email protected] | |
with: | |
source: https://www.gov.je/weather/ | |
destination: ${{ env.current_date }}-weather-forecast.png | |
full-page: true | |
delay: 3 | |
- name: copy-shipping-forecast-into-repo | |
run: cp /home/runner/work/_temp/${{ env.current_date }}-shipping-forecast.png /home/runner/work/sky-data/sky-data/${{ env.destdir }}/${{ env.current_date }}-shipping-forecast.png | |
- name: copy-weather-forecast-into-repo | |
run: cp /home/runner/work/_temp/${{ env.current_date }}-weather-forecast.png /home/runner/work/sky-data/sky-data/${{ env.destdir }}/${{ env.current_date }}-weather-forecast.png | |
- name: Download latest air temperature observation at Maison St Louis from jersey met service | |
run: wget -O $(date +'%Y/%m-%B/met-office/%d')/$(date +'%Y-%m-%d-%H%M-jerseymet-weather-obs-air-temp-maison-st-louis-observatory.png') https://sojpublicdata.blob.core.windows.net/jerseymet/Town/MSLTemp.Temp_MSL.png | |
- name: Download latest wind direction and speed observations at St Helier Harbour from jersey met service | |
run: wget -O $(date +'%Y/%m-%B/met-office/%d')/$(date +'%Y-%m-%d-%H%M-jerseymet-weather-obs-wind-dir-speed-st-helier.png') https://sojpublicdata.blob.core.windows.net/jerseymet/Town/internet.Wind.png | |
- name: Download latest wind direction and speed observations at St Catherines Breakwater from jersey met service | |
run: wget -O $(date +'%Y/%m-%B/met-office/%d')/$(date +'%Y-%m-%d-%H%M-jerseymet-weather-obs-wind-dir-speed-st-catherines.png') https://sojpublicdata.blob.core.windows.net/jerseymet/Town/StCathWind.Wind2.png | |
- name: Download latest rainfall at Maison St Louis from jersey met service | |
run: wget -O $(date +'%Y/%m-%B/met-office/%d')/$(date +'%Y-%m-%d-%H%M-jerseymet-weather-obs-rainfall-maison-st-louis-observatory.png') https://sojpublicdata.blob.core.windows.net/jerseymet/Town/internet.Rainfall.png | |
- name: Download latest UV index observations at St Catherines Breakwater from jersey met service | |
run: wget -O $(date +'%Y/%m-%B/met-office/%d')/$(date +'%Y-%m-%d-%H%M-jerseymet-weather-obs-uvindex-maison-st-louis-observatory.png') https://sojpublicdata.blob.core.windows.net/jerseymet/Town/internet.UV.png | |
- name: sleep-5s-for-screenshots-to-complete | |
run: sleep 5s | |
shell: bash | |
- name: commit-screenshots-to-repo | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: '${{ env.current_date }} - Nightly weather observations and shipping forecasts from jerseymet' |