Accept Baselines, Fix Lints, and Format #50
This file contains hidden or 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: Accept Baselines, Fix Lints, and Format | |
| on: | |
| workflow_dispatch: {} | |
| permissions: | |
| contents: read | |
| # Ensure scripts are run with pipefail. See: | |
| # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| token: ${{ secrets.TS_BOT_GITHUB_TOKEN }} | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version: 'lts/*' | |
| - name: Configure Git, Run Tests, Update Baselines, Apply Fixes | |
| run: | | |
| git config user.email "[email protected]" | |
| git config user.name "TypeScript Bot" | |
| npm ci | |
| git rm -r --quiet tests/baselines/reference | |
| npx hereby runtests-parallel --ci --fix || true | |
| npx hereby baseline-accept | |
| npx hereby format | |
| git add ./src | |
| git add ./tests/baselines/reference | |
| git diff --cached | |
| git commit -m "Update Baselines, Applied Lint Fixes, and/or Formatted" | |
| git push |