forked from european-modelling-hubs/ari-forecast-hub_archive
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1.17 KB
/
custom_target_pushed.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
name: CustomPushedTargets
on:
workflow_dispatch:
# push:
# branches: [main]
# paths:
# - 'target-data/FluID/**'
# - 'target-data/Respivirnet/**'
# - '!**README**'
# - '!**.md'
# - '!**.MD'
jobs:
custom-changes:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get changes
id: changed-files
run: echo "changed_files=$(git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | xargs)" >> $GITHUB_OUTPUT
- name: List changed files
run: |
for file in ${{ steps.changed-files.outputs.changed_files }}; do
echo "$file was changed"
done
# Save changes to artifact for json db store
- name: Save changes to artifact
env:
imported_files: ${{ steps.changed-files.outputs.changed_files }}
run: |
echo "{ \"pr-changes\" : \"$imported_files\" }" > pr_changes.json
- name: Upload changes
uses: actions/upload-artifact@v2
with:
name: pr_changes
path: ./pr_changes.json