-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (59 loc) · 2.87 KB
/
hourly-data-collection.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Hourly Data Collection from Jersey Met Office and Webcams
on:
schedule:
- cron: '0 * * * *'
# on:
# push:
# branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: get-current-date-time
id: datetime
run: echo "current_date_time=$(date +'%Y-%m-%d-%H%M')" >> $GITHUB_ENV
- name: set-eltico-directory-with-date
id: destdireltico
run: echo "destdireltico=$(date +'%Y/%m-%B/el-tico/%d')" >> $GITHUB_ENV
- name: set-watersplash-directory-with-date
id: destdirwatersplash
run: echo "destdirwatersplash=$(date +'%Y/%m-%B/watersplash/%d')" >> $GITHUB_ENV
- name: verify-directory-exists
run: |
mkdir -p ${{ env.destdireltico }}
mkdir -p ${{ env.destdirwatersplash }}
- name: screenshots-desktop-el-tico
uses: swinton/[email protected]
with:
source: https://player.twitch.tv/?channel=elticojersey&parent=thesurfyard.com
destination: ${{ env.current_date_time }}-el-tico-webcam.png
full-page: true
delay: 4
- name: screenshots-desktop-watersplash
uses: swinton/[email protected]
with:
source: https://portal.hdontap.com/s/embed/?stream=watersplash_visitjersey-CUST&ratio=16:9
destination: ${{ env.current_date_time }}-watersplash-webcam.png
full-page: true
delay: 2
- name: copy-el-tico-webcam-into-repo
run: cp /home/runner/work/_temp/${{ env.current_date_time }}-el-tico-webcam.png /home/runner/work/sky-data/sky-data/${{ env.destdireltico }}/${{ env.current_date_time }}-el-tico-webcam.png
- name: copy-watersplash-webcam-into-repo
run: cp /home/runner/work/_temp/${{ env.current_date_time }}-watersplash-webcam.png /home/runner/work/sky-data/sky-data/${{ env.destdirwatersplash }}/${{ env.current_date_time }}-watersplash-webcam.png
- name: Download latest satellite image from jersey met service
run: |
mkdir -p $(date +'%Y/%m-%B/met-office/%d')
wget -O $(date +'%Y/%m-%B/met-office/%d')/$(date +'%Y-%m-%d-%H%M-jerseymet-satellite.jpg') https://sojpublicdata.blob.core.windows.net/jerseymet/Satellite10.JPG
- name: Download latest runway camera image from jersey airport
run: |
mkdir -p $(date +'%Y/%m-%B/jersey-airport/%d')
wget -O $(date +'%Y/%m-%B/jersey-airport/%d')/$(date +'%Y-%m-%d-%H%M-jerseyairport-runwaycam.jpg') https://sojpublicdata.blob.core.windows.net/jerseymet/Webcam/Airport_00001.jpg
- name: sleep-3s-for-screenshot-to-complete
run: sleep 3s
shell: bash
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Latest hourly images from jerseymet and jerseyairport