Updated pre-commit action so that it doesn't run twice for pull requests #578
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: "Labeler" | |
on: | |
workflow_dispatch: | |
pull_request_target: | |
branches: ["main"] | |
types: ["opened", "synchronize"] | |
jobs: | |
labeler: | |
name: Labeler | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
pull-requests: write | |
steps: | |
- name: Generate Token | |
uses: actions/create-github-app-token@c4fa18d55c5d49e6a2793e351ea4938322c61072 # v1.6.4 | |
id: app-token | |
with: | |
app-id: "${{ secrets.BOT_APP_ID }}" | |
private-key: "${{ secrets.BOT_APP_PRIVATE_KEY }}" | |
- name: Labeler | |
uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0 | |
with: | |
configuration-path: .github/labeler.yaml | |
repo-token: "${{ steps.app-token.outputs.token }}" |