From d2f4009c207c0f2faa8fbd3380879d9ea945a996 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Thu, 6 Apr 2023 15:44:59 +0200 Subject: [PATCH] dividing workflows --- .github/workflows/pr_labels.yml | 49 +++++++++++++++++++ ..._actions.yml => project_task_statuses.yml} | 47 +----------------- 2 files changed, 50 insertions(+), 46 deletions(-) create mode 100644 .github/workflows/pr_labels.yml rename .github/workflows/{project_actions.yml => project_task_statuses.yml} (68%) diff --git a/.github/workflows/pr_labels.yml b/.github/workflows/pr_labels.yml new file mode 100644 index 0000000000..c1ab3547f2 --- /dev/null +++ b/.github/workflows/pr_labels.yml @@ -0,0 +1,49 @@ +name: pr-labels + +on: + pull_request_target: + types: [opened, assigned] + +jobs: + size-label: + name: pr_size_label + runs-on: ubuntu-latest + if: github.event.action == 'assigned' || github.event.action == 'opened' + steps: + - name: Add size label + uses: "pascalgn/size-label-action@v0.4.3" + env: + GITHUB_TOKEN: "${{ secrets.YNPUT_BOT_TOKEN }}" + IGNORED: ".gitignore\n*.md\n*.json" + with: + sizes: > + { + "0": "XS", + "100": "S", + "500": "M", + "1000": "L", + "1500": "XL", + "2500": "XXL" + } + + label_prs_branch: + name: pr_branch_label + runs-on: ubuntu-latest + if: github.event.action == 'assigned' || github.event.action == 'opened' + steps: + - name: Label PRs - Branch name detection + uses: ffittschen/pr-branch-labeler@v1 + with: + repo-token: ${{ secrets.YNPUT_BOT_TOKEN }} + + label_prs_globe: + name: pr_globe_label + runs-on: ubuntu-latest + if: github.event.action == 'assigned' || github.event.action == 'opened' + steps: + - name: Label PRs - Globe detection + uses: actions/labeler@v4.0.3 + with: + repo-token: ${{ secrets.YNPUT_BOT_TOKEN }} + configuration-path: ".github/pr-glob-labeler.yml" + sync-labels: false diff --git a/.github/workflows/project_actions.yml b/.github/workflows/project_task_statuses.yml similarity index 68% rename from .github/workflows/project_actions.yml rename to .github/workflows/project_task_statuses.yml index 3589b4acc2..b3eb5ad810 100644 --- a/.github/workflows/project_actions.yml +++ b/.github/workflows/project_task_statuses.yml @@ -1,8 +1,6 @@ -name: project-actions +name: project-task-statuses on: - pull_request_target: - types: [opened, assigned] pull_request_review: types: [submitted] issue_comment: @@ -70,46 +68,3 @@ jobs: -d '{ "status": "in progress" }' - - size-label: - name: pr_size_label - runs-on: ubuntu-latest - if: github.event.action == 'assigned' || github.event.action == 'opened' - steps: - - name: Add size label - uses: "pascalgn/size-label-action@v0.4.3" - env: - GITHUB_TOKEN: "${{ secrets.YNPUT_BOT_TOKEN }}" - IGNORED: ".gitignore\n*.md\n*.json" - with: - sizes: > - { - "0": "XS", - "100": "S", - "500": "M", - "1000": "L", - "1500": "XL", - "2500": "XXL" - } - - label_prs_branch: - name: pr_branch_label - runs-on: ubuntu-latest - if: github.event.action == 'assigned' || github.event.action == 'opened' - steps: - - name: Label PRs - Branch name detection - uses: ffittschen/pr-branch-labeler@v1 - with: - repo-token: ${{ secrets.YNPUT_BOT_TOKEN }} - - label_prs_globe: - name: pr_globe_label - runs-on: ubuntu-latest - if: github.event.action == 'assigned' || github.event.action == 'opened' - steps: - - name: Label PRs - Globe detection - uses: actions/labeler@v4.0.3 - with: - repo-token: ${{ secrets.YNPUT_BOT_TOKEN }} - configuration-path: ".github/pr-glob-labeler.yml" - sync-labels: false