generated from AustralianBioCommons/guide-template
-
Notifications
You must be signed in to change notification settings - Fork 5
42 lines (35 loc) · 1.03 KB
/
import_file.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
name: Pull data.yml from australianbiocommons.github.io
on:
workflow_dispatch:
push:
jobs:
pull-file:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout source
uses: actions/checkout@v3
with:
repository: AustralianBioCommons/australianbiocommons.github.io
path: temporary_folder
- name: Update
run: |
ls
cp -u temporary_folder/data/data.yaml data/data.yaml
cd ..
- name: Check for changes
run: |
if git diff --quiet; then
echo "There is no change in data.yaml."
echo "exiting = true" >> $GITHUB_ENV
fi
- name: Commit
if: env.exiting != 'true'
run: |
git config user.name github-actions
git config user.email [email protected]
git add data/data.yaml
git commit -m "Updated the data.yml sourced from australianbiocommons.github.io"
git push
fi