forked from uwescience/GitHubActionsTutorial-USRSE24
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (51 loc) · 1.5 KB
/
noise_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
name: Ambient Sound Processing
on:
# To run manually
workflow_dispatch:
# push:
# branches:
# - main
# - caching
#schedule:
# - cron: '51 21 8 7 *'
jobs:
process:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9.18'
# cache: 'pip'
# cache-dependency-path: ambient_sound_analysis/requirements_noise.txt
- name: Install Python dependencies
run: |
pip install -r ambient_sound_analysis/requirements_noise.txt
- name: Install ffmpeg
run: |
sudo apt-get update
sudo apt-get install ffmpeg
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: ffmpeg
- name: Create plots
if: steps.cache.outputs.cache-hit != 'true'
run: |
python ambient_sound_analysis/noise_processing.py
- name: Upload to GitHub repo
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Commit to Github
file_pattern: 'ambient_sound_analysis/img/broadband.png'
- name: Upload as artifact
uses: actions/upload-artifact@v4
with:
name: ambient_sound_plots
path: ambient_sound_analysis/img/*.png
# - name: Upload to Google Drive
# uses: AnimMouse/setup-rclone@v1
# with:
# rclone_config: ${{secrets.RCLONE_CONFIG}}
#
# - run: |
# rclone copy ambient_sound_analysis/img/broadband.png mydrive:rclone_uploads/