build(deps): bump actions/cache from 5 to 6 #56
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: labeler | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| jobs: | |
| label: | |
| runs-on: ubuntu-latest | |
| if: github.repository_owner == 'harpertoken' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Create labels | |
| run: | | |
| for label in "security:ff6b6b" "docs:74c9fd" "ci:4a9fe8" \ | |
| "config:ffd700" "tests:a8d5ff" "refactor:9b59b6" \ | |
| "feature:28a745" "bug:e74c3c" "emergency:dc3545"; do | |
| IFS=':' read -r name color <<< "$label" | |
| gh label create "$name" --color "$color" --force 2>/dev/null || true | |
| done | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Get changed files | |
| id: files | |
| uses: jitterbit/get-changed-files@v1 | |
| with: | |
| format: space-delimited | |
| - name: Label PR | |
| uses: actions/labeler@v6 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| configuration-path: .github/labeler.yml | |
| - name: Check for emergency keyword | |
| if: > | |
| contains(github.event.pull_request.title, '[emergency]') || | |
| contains(github.event.pull_request.title, '[urgent]') || | |
| contains(github.event.pull_request.title, '[critical]') | |
| run: | | |
| gh pr edit ${{ github.event.pull_request.number }} --add-label "emergency" | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |