-
-
Notifications
You must be signed in to change notification settings - Fork 257
39 lines (34 loc) · 1.36 KB
/
palette.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Palette
on:
push:
workflow_dispatch:
schedule:
- cron: '0 0 * * *' # Run every day at midnight UTC
jobs:
createPullRequest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Make changes to pull request
run: |
curl -o /tmp/palette.json https://raw.githubusercontent.com/catppuccin/palette/main/palette.json
python -c "import json
data = json.load(open('/tmp/palette.json'))
for flavour in data:
with open('lua/catppuccin/palettes/{flavour}.lua'.format(flavour = flavour), 'w') as f:
f.write('return {\n')
for accent in data[flavour]: f.write('\t{accent} = \"{hex}\",\n'.format(accent = accent, hex = data[flavour][accent]['hex']))
f.write('}\n')"
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v5
with:
commit-message: 'feat: auto-sync upstream palettes'
committer: GitHub <[email protected]>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
branch: new-palettes
delete-branch: true
title: 'feat: auto-sync upstream palettes'
body: |
Auto-update `lua/catppuccin/palettes/` based on https://github.com/catppuccin/palette/blob/main/palette.json