Skip to content

Add action to pull data.yml #2

Add action to pull data.yml

Add action to pull data.yml #2

Workflow file for this run

name: Pull data.yml from australianbiocommons.github.io
on:
workflow_dispatch:
push:
jobs:
pull-file:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v3
with:
repository: AustralianBioCommons/australianbiocommons.github.io
path: temporary_folder
- name: Update
run: |
cd temporary_folder
cp -u _data/data.yml ../
cd ..
- name: Check for changes
run: |
if git diff --quiet; then
echo "There is no change in data.yml."
echo "exiting = true" >> $GITHUB_ENV
fi
- name: Commit
if: env.exiting != 'true'
run: |
git config user.name "{{ github.actor }}"
git config user.email "{{ github.actor }}@users.noreply.github.com"
git add _data/data.yml
git commit -m "Updated the data.yml sourced from australianbiocommons.github.io"

Check failure on line 38 in .github/workflows/import_file.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/import_file.yml

Invalid workflow file

You have an error in your yaml syntax on line 38
- name: Push
if: env.exiting != 'true'
run: |
git push
fi