-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (32 loc) · 1.36 KB
/
super-linter.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
name: Super Linter
on:
push:
branches: [master]
pull_request:
branches: [master]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions: {}
jobs:
prettier:
if: github.head_ref != 'release-please--branches--master'
name: Prettify code base # Mainly lint the automaic change log file created by release-please, which is on the release-please branch.
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.head_ref }}
# Make sure the value of GITHUB_TOKEN will not be persisted in repo's config
persist-credentials: false
- name: Prettify code
uses: creyD/[email protected]
with:
prettier_options: . --write # Prettify all files in the repository.
github_token: ${{ secrets.PRETTIER_TOKEN }} # Set custom token.
lint:
if: ${{ always() }} # This job will always run after the prettier job, regardless of the outcome. https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/using-jobs-in-a-workflow#defining-prerequisite-jobs
needs: prettier
name: Lint code base
uses: andrew-field/reusable-workflows/.github/workflows/super-linter.yml@master