-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (34 loc) · 1.05 KB
/
update-public.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
name: Update distant public repo from working repo
on:
workflow_dispatch:
schedule:
- cron: '30 5,17 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
path: distant-public
- uses: actions/checkout@v2
with:
repository: AustralianAntarcticDivision/distant-working
path: distant-working
token: ${{secrets.PUSH_TOKEN}}
- name: Update public stuff
run: |
cp distant-working/data/metadata.csv distant-public/
cp distant-working/README-public.md distant-public/README.md
cd distant-public
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git add -A
if [ -z "$(git status --porcelain)" ];
then
exit 0;
fi
git commit -m "Auto update"
git push https://$USERNAME:[email protected]/SCAR/distant.git
env:
REPO_KEY: ${{secrets.PUSH_TOKEN}}
USERNAME: github-actions[bot]