-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #102 from 9renpoto/feature/labels
feat: sync labels
- Loading branch information
Showing
4 changed files
with
79 additions
and
2 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Export label | ||
|
||
on: | ||
label: | ||
types: [created, edited, deleted] | ||
workflow_dispatch: | ||
|
||
permissions: | ||
issues: read | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
export_labels: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- uses: EndBug/export-label-config@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
create_pull_request: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
needs: | ||
- export_labels | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: main | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: Label config | ||
- run: cp labels.yaml .github/labels.yaml | ||
- uses: peter-evans/create-pull-request@v5 | ||
with: | ||
commit-message: Update labels | ||
delete-branch: true | ||
title: Update labels | ||
committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | ||
branch: create-pull-request/patch-export-label | ||
add-paths: | | ||
.github/labels.yaml |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Sync labels | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- ".github/labels.yaml" | ||
workflow_dispatch: | ||
|
||
permissions: | ||
issues: write | ||
contents: read | ||
|
||
jobs: | ||
label_sync: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 2 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: EndBug/label-sync@v2 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
config-file: .github/labels.yaml | ||
delete-other-labels: true |