-
Notifications
You must be signed in to change notification settings - Fork 10
77 lines (61 loc) · 2.09 KB
/
orcasound_processing.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
77
name: Orcasound processing
on:
# To run manually
workflow_dispatch:
jobs:
process:
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Install Python dependencies
run: |
python -m pip install -U pip
python -m pip install -U setuptools wheel
python -m pip install awscli matplotlib scipy m3u8 git+https://github.com/kkroening/ffmpeg-python
- name: Install ffmpeg
run: |
sudo apt-get update
sudo apt-get install ffmpeg
# - name: Get latest timestamp
# run: |
# aws --no-sign-request s3 cp s3://streaming-orcasound-net/rpi_bush_point/latest.txt .
# read -r timestamp<latest.txt
# echo "timestamp=$timestamp" >> $GITHUB_ENV
- name: Set hardcoded "full" timestamp
# 1618317018
# Tue Apr 13 2021 12:30:18 GMT+0000
run: |
echo "timestamp=1618317018" >> $GITHUB_ENV
- uses: actions/cache@v2
id: cache
with:
path: |
bush_point/${{ env.timestamp }}/
key: bush_point-${{ env.timestamp }}
- name: Get all files
if: steps.cache.outputs.cache-hit != 'true'
run: |
aws --no-sign-request s3 sync s3://streaming-orcasound-net/rpi_bush_point/hls/${{ env.timestamp }}/ bush_point/${{ env.timestamp }}
rm -rf bush_point/${{ env.timestamp }}/live2159.ts
- name: Create spectrograms
run: |
mkdir -p png/
python orcasound_processing.py bush_point/${{ env.timestamp }} -o png/
- name: Remove files
run: |
rm -rf bush_point/${{ env.timestamp }}/*.ts
rm -rf bush_point/${{ env.timestamp }}/*.wav
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Commit to Github
file_pattern: '*.png'
- uses: actions/upload-artifact@v2
with:
name: Spectrograms
path: |
png/*.png