Skip to content

Pull data.yml from australianbiocommons.github.io #63

Pull data.yml from australianbiocommons.github.io

Pull data.yml from australianbiocommons.github.io #63

Workflow file for this run

name: Pull data.yml from australianbiocommons.github.io
on:
workflow_dispatch:
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 temporary_folder/data
cp -u temporary_folder/data/data.yaml _data/data.yaml
cd ..
- name: Remove
run: |
rm -r temporary_folder
- name: Commit if updated
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add _data/data.yaml
git diff-index --quiet HEAD || git commit -m "Updated the data.yml sourced from australianbiocommons.github.io"
- name: Push if changes
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main