-
Notifications
You must be signed in to change notification settings - Fork 8
80 lines (72 loc) · 2.31 KB
/
prepare-plot-data.yml
File metadata and controls
80 lines (72 loc) · 2.31 KB
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
78
79
80
name: "prepare-plot-data"
on:
workflow_dispatch:
# schedule:
# - cron: "30 11,12,13,14 * * *"
push:
branches:
- main
paths:
- submissions/icosari/sari/KIT-MeanEnsemble/*.csv
- submissions/agi/are/KIT-MeanEnsemble/*.csv
jobs:
get-commit-dates:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install Python dependencies
run: pip install pandas GitPython
- name: Get commit dates
working-directory: code
run: python get_commit_dates.py
- name: Commit files
env:
AUTH: ${{ secrets.PAT_DW }}
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git remote rm origin
git remote add origin https://${AUTH}@github.com/KITmetricslab/RESPINOW-Hub.git > /dev/null 2>&1
git pull origin main
git add --all
git commit --allow-empty -m "Update commit dates"
- name: Push changes
run: |
git push --quiet --set-upstream origin HEAD:main
echo "pushed to github"
prepare-plot-data:
runs-on: ubuntu-latest
needs: get-commit-dates
steps:
- name: Checkout
uses: actions/checkout@main
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
r-version: '4.2.3'
- name: Prepare plot data
run: |
Rscript ./code/generate_plot_data.R
- name: Commit files
env:
AUTH: ${{ secrets.PAT_DW }}
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git remote rm origin
git remote add origin https://${AUTH}@github.com/KITmetricslab/RESPINOW-Hub.git > /dev/null 2>&1
git pull origin main
git add --all
git commit --allow-empty -m "Update plot data"
- name: Push changes
run: |
git push --quiet --set-upstream origin HEAD:main
echo "pushed to github"