Add labels in a more principled way. #247
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: Autofixers | |
on: | |
- pull_request | |
jobs: | |
autofix: | |
runs-on: ubuntu-latest | |
if: github.actor != 'khan-actions-bot' | |
steps: | |
- name: Checkout the repo | |
uses: actions/checkout@v4 | |
- name: Setup Node.js, install deps | |
uses: ./.github/actions/setup | |
- name: Get All Changed Files | |
uses: Khan/actions@get-changed-files-v2 | |
id: changed | |
with: | |
directories: src/ | |
- id: changed-js | |
name: Find .js changed files | |
uses: Khan/actions@filter-files-v1 | |
if: always() | |
with: | |
changed-files: ${{ steps.changed.outputs.files }} | |
extensions: '.js' | |
- name: Run prettier | |
if: steps.changed-js.outputs.filtered != '[]' | |
run: echo '${{ steps.changed-js.outputs.filtered }}' | jq -r .[] | xargs yarn run format-files | |
- name: Rebuild our "dist" file | |
if: steps.changed.outputs.files != '[]' | |
run: yarn build | |
- uses: Khan/autofix-commit-action@main | |
env: | |
GITHUB_TOKEN: '${{ secrets.KHAN_ACTIONS_BOT_TOKEN }}' |