Skip to content

Feat/auto ci fmt

Feat/auto ci fmt #1676

Workflow file for this run

name: lint
on:
pull_request:
push:
branches:
- master
jobs:
linter:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'yarn'
- name: Install project dependencies
run: yarn install
- name: Lint
run: yarn nx format:check --all
continue-on-error: true # Continue even if the check fails
- name: Check Lint Results
id: lint_result_check
run: |
if [ $? -ne 0 ]; then
echo "lint_failed=true" >> $GITHUB_ENV
echo "::set-output name=lint_failed::true"
else
echo "lint_failed=false" >> $GITHUB_ENV
echo "::set-output name=lint_failed::false"
fi
outputs:

Check failure on line 36 in .github/workflows/lint.yml

View workflow run for this annotation

GitHub Actions / lint

Invalid workflow file

The workflow is not valid. .github/workflows/lint.yml (Line: 36, Col: 9): Unexpected value 'outputs'
lint_failed: ${{ steps.lint_result_check.outputs.lint_failed }}
- name: Auto-format and commit changes if needed
if: ${{ steps.lint_result_check.outputs.lint_failed == 'true' }}
run: |
yarn nx format:write --all
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
git add .
git commit -m "fmt"
git push