Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions .github/workflows/format.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
name: File Generator
name: Generate Health Files & Format

on:
workflow_dispatch:
push:
paths:
- "scripts/**/*"
branches: [main]

env:
HAS_USERSTYLES_TOKEN: ${{ secrets.USERSTYLES_TOKEN != '' }}

jobs:
generate-health-files:
name: Generate health files
generate-health-files-and-format:
name: Generate health files & format
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
Expand All @@ -37,10 +36,23 @@ jobs:
- name: Generate health files
run: deno task ci:generate

- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
message: "chore: generate health files"
default_author: github_actions
push: false

- name: Format files
run: npx prettier --write .

- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
message: "style: format code with prettier"
default_author: github_actions
push: false

- name: Push changes
uses: stefanzweifel/git-auto-commit-action@v5
if: ${{ github.repository == 'catppuccin/userstyles' && github.ref == 'refs/heads/main' && env.HAS_USERSTYLES_TOKEN }}
with:
commit_message: "chore: generate health files"
commit_author: "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>"
branch: ${{ github.ref }}
run: git push origin "HEAD:${{ github.ref }}" --atomic