Skip to content

Update distant public repo from working repo #365

Update distant public repo from working repo

Update distant public repo from working repo #365

Workflow file for this run

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]