Auto download colour backup data #9
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
name: Auto download colour backup data | |
on: | |
schedule: | |
- cron: 0 10 15 1,7 * | |
workflow_dispatch: | |
jobs: | |
download: | |
name: Download colour data | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Download colours data | |
shell: pwsh | |
run: .\fetch.ps1 | |
- name: Config Git | |
run: | | |
git config --local user.name "Colour fetch" | |
git config --local user.email "enquiry@rk0cc.xyz" | |
- name: Check differences | |
id: difference | |
run: git diff --quiet | |
continue-on-error: true | |
- name: Add and commit | |
if: steps.difference.outcome == 'failure' | |
run: | | |
git add . | |
git commit -m "Update colour backup data" | |
- name: Push | |
if: steps.difference.outcome == 'failure' | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: main |