Update Color Names #18
This file contains hidden or 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: Update Color Names | |
| on: | |
| schedule: | |
| - cron: "0 12 * * 1" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| update: | |
| name: Fetch latest color names | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Fetch and transform upstream list | |
| run: | | |
| set -euo pipefail | |
| curl --fail --retry 3 --retry-delay 5 --retry-all-errors --max-time 60 -sSL \ | |
| https://unpkg.com/color-name-list/dist/colornames.bestof.json \ | |
| -o upstream.json | |
| jq -c '{colors: [.[] | {name, hex}]}' upstream.json > Pika/Assets/ColorNames.json | |
| rm upstream.json | |
| - name: Open pull request if changed | |
| uses: peter-evans/create-pull-request@v8 | |
| with: | |
| branch: chore/update-color-names | |
| commit-message: "chore: update ColorNames.json from color-name-list" | |
| title: "chore: update ColorNames.json" | |
| body: | | |
| Automated refresh of `Pika/Assets/ColorNames.json` from | |
| [color-name-list](https://unpkg.com/color-name-list/dist/colornames.bestof.json). | |
| labels: dependencies | |
| add-paths: Pika/Assets/ColorNames.json |