[DEVOPS-280] Add runYarnInstall input to Simple Lint workflow #98
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: Simple Linter and Formatter | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
workflow_call: | |
inputs: | |
runPrettier: | |
default: true | |
type: boolean | |
runYarnInstall: | |
default: false | |
type: boolean | |
secrets: | |
PAT_ACTION_CI: | |
required: true | |
jobs: | |
prettier: | |
name: Prettier Check | |
if: ${{ inputs.runPrettier }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.PAT_ACTION_CI }} | |
- name: Use cache-next-install action | |
if: ${{ inputs.runYarnInstall }} | |
uses: Andrews-McMeel-Universal/cache-next-install@v1 | |
- uses: actionsx/prettier@v3 | |
with: | |
args: --write . | |
- uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_user_name: amutechtest | |
commit_user_email: amu_deploy@amuniversal.com | |
commit_message: Apply prettier changes | |
lint-workflows: | |
name: Workflow linter | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Download actionlint | |
id: get_actionlint | |
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) | |
shell: bash | |
- name: Lint workflow files | |
run: ${{ steps.get_actionlint.outputs.executable }} -color -ignore "SC2086" -ignore "SC2129" | |
shell: bash |