-
-
Notifications
You must be signed in to change notification settings - Fork 168
62 lines (51 loc) · 1.68 KB
/
ci.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: CI
on:
push:
branches: [main]
jobs:
ci:
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
# Prevent infinite loops by checking if the last commit was autogenerated.
if: ${{ github.repository == 'catppuccin/userstyles' && github.event.commits[0].author.name != 'github-actions' }}
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.USERSTYLES_TOKEN }}
fetch-depth: 2
- name: Setup Deno
uses: nekowinston/setup-deno@main
with:
deno-version: v2.1.3
- name: Bump changed userstyles
run: |
git diff --name-only HEAD^1 HEAD | grep '^styles/.*catppuccin\.user\.less$' | xargs deno task bump
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
message: "chore: bump changed userstyles"
default_author: github_actions
push: false
- name: Update generated files
run: deno task generate
env:
GITHUB_TOKEN: ${{ secrets.USERSTYLES_TOKEN }}
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
message: "chore: update generated files"
default_author: github_actions
push: false
- name: Format files
run: deno fmt
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
message: "style: deno fmt"
default_author: github_actions
push: false
- name: Push changes
run: git push origin "HEAD:${{ github.ref }}" --atomic