Switched to actions/labeler for PR labeling

fixes https://github.com/TryGhost/DevOps/issues/111

- this allows us to add labels based upon the contents in a smarter way
  than the previous workflow
This commit is contained in:
Daniel Lockyer 2023-11-20 11:33:14 +01:00 committed by Daniel Lockyer
parent 2b90d4b9dc
commit c695497598
3 changed files with 18 additions and 21 deletions

7
.github/labeler.yml vendored Normal file
View File

@ -0,0 +1,7 @@
'affects:i18n':
- 'ghost/i18n/**'
'affects:admin':
- 'ghost/admin/**'
- 'apps/admin-x-**'
'affects:portal':
- 'apps/portal/**'

View File

@ -1,21 +0,0 @@
name: i18n check
on:
pull_request_target:
types: [opened]
paths:
- 'ghost/i18n/locales/**'
jobs:
create-label:
runs-on: ubuntu-latest
if: github.repository_owner == 'TryGhost'
name: Add i18n label
steps:
- uses: actions/github-script@v6
with:
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ["i18n"]
})

11
.github/workflows/labeler.yml vendored Normal file
View File

@ -0,0 +1,11 @@
name: PR labeler
on:
- pull_request_target
jobs:
triage:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4