Skip to content

Auto download colour backup data #7

Auto download colour backup data

Auto download colour backup data #7

Workflow file for this run

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
working-directory: lib/
run: curl -LO https://raw.githubusercontent.com/ozh/github-colors/master/colors.json
- name: Minify data
uses: StefanEnsmann/Minify-JSON-Action@1.1.0
with:
input_file: lib/colors.json
- 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