fix: Prettier action to write to files #79
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |