ci(format): use actionsx/prettier
This commit is contained in:
parent
f384a511cd
commit
fae1cb9163
18
.github/workflows/format.yml
vendored
18
.github/workflows/format.yml
vendored
@ -12,12 +12,20 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.USERSTYLES_TOKEN }}
|
# using the USERSTYLES_TOKEN for main (branch protection),
|
||||||
# Make sure the actual branch is checked out when running on pull requests
|
# and general github.token for PRs
|
||||||
ref: ${{ github.head_ref }}
|
token: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && secrets.USERSTYLES_TOKEN || github.token }}}
|
||||||
|
|
||||||
- name: Run prettier
|
- name: Run prettier
|
||||||
uses: creyD/prettier_action@v4.3
|
uses: actionsx/prettier@v2
|
||||||
|
with:
|
||||||
|
args: "--write styles/**/*.css"
|
||||||
|
|
||||||
|
- name: Push Changes
|
||||||
|
uses: stefanzweifel/git-auto-commit-action@v4
|
||||||
|
if: ${{ github.repository == 'catppuccin/userstyles' && github.ref == 'refs/heads/main' }}
|
||||||
with:
|
with:
|
||||||
commit_message: "style: format code with prettier"
|
commit_message: "style: format code with prettier"
|
||||||
prettier_options: "--write styles/**/*.css"
|
commit_author: "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>"
|
||||||
|
branch: ${{ github.ref }}
|
||||||
|
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
||||||
|
Loading…
x
Reference in New Issue
Block a user