From 0c8dfa9ff79aacfe5c7046310d5e25b12bee1cfe Mon Sep 17 00:00:00 2001 From: Keisuke Umeno <9renpoto@gmail.com> Date: Sun, 31 Dec 2023 11:54:57 +0900 Subject: [PATCH] feat: export labels (#1941) --- .github/workflows/export-labels | 44 +++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/export-labels diff --git a/.github/workflows/export-labels b/.github/workflows/export-labels new file mode 100644 index 00000000..4153fd43 --- /dev/null +++ b/.github/workflows/export-labels @@ -0,0 +1,44 @@ +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 +