-
-
Notifications
You must be signed in to change notification settings - Fork 28
28 lines (25 loc) · 1021 Bytes
/
prettify-pr.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
name: Prettify Code
on: pull_request
jobs:
prettify:
name: Prettify
runs-on: ubuntu-latest
# This action only works on the original repository, not on forks
if: "${{ github.event.pull_request.head.repo.full_name == github.repository }}"
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
# Make sure the actual branch is checked out when running on pull requests, required for prettify
ref: ${{ github.head_ref }}
# Make sure the value of GITHUB_TOKEN will not be persisted in repo's config
persist-credentials: false
- name: Initialize repository
uses: ./.github/workflows/actions/init
- name: Prettify code
uses: creyD/[email protected]
with:
prettier_version: "3.4.2"
prettier_plugins: "[email protected] [email protected]"
prettier_options: "--write ./"
github_token: ${{ secrets.WORKFLOW_TOKEN }}