.github/workflows/import.yml #837
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
schedule: | |
- cron: "12 3 * * *" | |
workflow_dispatch: | |
jobs: | |
import: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v3 | |
- name: Run import.php | |
run: php data/import.php | |
- name: Commit and push | |
run: | | |
if git diff --exit-code data/data.php; then | |
echo "Aborting action, remote data has not changed." | |
exit 0 | |
fi | |
git config user.name github-actions | |
git config user.email [email protected] | |
git commit -m "Update data.php" data/data.php | |
git push |