Skip to content

Commit 38ea6ef

Browse files
authored
Use shared format workflow (#3856)
1 parent cd4bdf3 commit 38ea6ef

1 file changed

Lines changed: 9 additions & 23 deletions

File tree

.github/workflows/format.yml

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,14 @@ on:
55
branches:
66
- main
77

8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
812
jobs:
913
format:
10-
runs-on: ubuntu-latest
11-
steps:
12-
- name: Check out code using Git
13-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
14-
with:
15-
ref: ${{ github.head_ref }}
16-
# Needs access to push to main
17-
token: ${{ secrets.FREDKBOT_GITHUB_TOKEN }}
18-
- uses: pnpm/action-setup@903f9c1a6ebcba6cf41d87230be49611ac97822e # v6.0.3
19-
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
20-
with:
21-
node-version: 22.12.0
22-
cache: 'pnpm'
23-
- run: pnpm i
24-
- name: Format with Prettier
25-
run: pnpm format
26-
- name: Commit changes
27-
uses: stefanzweifel/git-auto-commit-action@04702edda442b2e678b25b537cec683a1493fcb9 # v7.1.0
28-
with:
29-
commit_message: '[ci] format'
30-
branch: ${{ github.head_ref }}
31-
commit_user_name: fredkbot
32-
commit_user_email: [email protected]
14+
if: github.repository_owner == 'withastro'
15+
uses: withastro/automation/.github/workflows/format.yml@497c9268ad4267c842a8f6c4d830ad0182d6f6b3 # main
16+
with:
17+
command: "format"
18+
secrets: inherit

0 commit comments

Comments
 (0)