Skip to content

Switch back to using major-only versions for actions #270

Switch back to using major-only versions for actions

Switch back to using major-only versions for actions #270

Workflow file for this run

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@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Setup Node.js, install deps
uses: ./.github/actions/setup
- name: Get All Changed Files
uses: Khan/actions@c72fbe11ecb7b2d2e327d5e372c4e90bd461e233 # get-changed-files-v2
id: changed
with:
directories: src/
- id: changed-js
name: Find .js changed files
uses: Khan/actions@62b87ee091634f22dbcf87e3cb69e4bd7d6827a7 # filter-files-v2
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 pnpm run format-files
- name: Rebuild our "dist" file
if: steps.changed.outputs.files != '[]'
run: pnpm build
- uses: Khan/autofix-commit-action@7ad29653a245c4bc54859d8644f233f94a99a183 # main
env:
GITHUB_TOKEN: '${{ secrets.KHAN_ACTIONS_BOT_TOKEN }}'