diff --git a/.github/workflows/assign-author.yml b/.github/workflows/assign-author.yml new file mode 100644 index 000000000..554320dde --- /dev/null +++ b/.github/workflows/assign-author.yml @@ -0,0 +1,17 @@ +name: 🤖 PR author as an assignee +on: + pull_request: + types: [opened] + +jobs: + assign: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4.2.0 + - uses: taiga-family/ci/actions/setup/variables@v1.89.0 + - uses: toshimaru/auto-author-assign@v2.1.1 + continue-on-error: true + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true diff --git a/.github/workflows/pr.yml b/.github/workflows/auto-merge.yml similarity index 65% rename from .github/workflows/pr.yml rename to .github/workflows/auto-merge.yml index 70e3b173a..9488cfd44 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/auto-merge.yml @@ -1,8 +1,6 @@ -name: 🤖 PR suites +name: 🤖 PR auto merge on: pull_request: - pull_request_review: - types: [submitted] env: JOBS_NAME: '[ "Build package", "Build demo", "Lint", "Tests", "E2E" ]' @@ -16,7 +14,6 @@ jobs: - uses: actions/checkout@v4.2.0 - uses: taiga-family/ci/actions/setup/variables@v1.89.0 - id: matrix - if: env.IS_TAIGA_FAMILY_BOT_PR_AUTHOR == 'true' run: echo "value=$JOBS_NAME" >> $GITHUB_OUTPUT wait: @@ -36,37 +33,18 @@ jobs: needs: [wait] runs-on: ubuntu-latest steps: + - uses: actions/checkout@v4.2.0 + - uses: taiga-family/ci/actions/setup/variables@v1.89.0 - uses: taiga-family/ci/actions/auto/approve/double@v1.89.0 + if: env.IS_TAIGA_FAMILY_BOT_PR_AUTHOR == 'true' with: token1: ${{ secrets.GITHUB_TOKEN }} token2: ${{ secrets.TAIGA_FAMILY_APPROVE_BOT_PAT }} - uses: taiga-family/ci/actions/run/merge@v1.89.0 + if: env.IS_TAIGA_FAMILY_BOT_PR_AUTHOR == 'true' with: token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }} - label-when-approved: - name: Label when approved - runs-on: ubuntu-latest - if: github.event.review.state == 'APPROVED' - steps: - - uses: actions/checkout@v4.2.0 - - uses: taiga-family/ci/actions/setup/variables@v1.89.0 - - uses: taiga-family/ci/actions/auto/label-when-approved@v1.89.0 - with: - approvals: 1 - token: ${{ secrets.GITHUB_TOKEN }} - - assign-author: - name: PR author as an assignee - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4.2.0 - - uses: taiga-family/ci/actions/setup/variables@v1.89.0 - - uses: toshimaru/auto-author-assign@v2.1.1 - if: env.IS_OWNER_MODE == 'true' - with: - repo-token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }} - concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true diff --git a/.github/workflows/ready-to-merge.yml b/.github/workflows/ready-to-merge.yml new file mode 100644 index 000000000..b664e2aa0 --- /dev/null +++ b/.github/workflows/ready-to-merge.yml @@ -0,0 +1,21 @@ +name: 🤖 PR is ready to merge +on: + pull_request_review: + types: [submitted] + +jobs: + label-when-approved: + name: Label when approved + runs-on: ubuntu-latest + if: github.event.review.state == 'approved' + steps: + - uses: actions/checkout@v4.2.0 + - uses: taiga-family/ci/actions/setup/variables@v1.89.0 + - uses: taiga-family/ci/actions/auto/label-when-approved@v1.89.0 + with: + approvals: 1 + token: ${{ secrets.GITHUB_TOKEN }} + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index aeb60c228..aa5ddb9a8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,7 +38,3 @@ jobs: token: ${{ secrets.TAIGA_TELEGRAM_BOT_TOKEN }} version: v${{ steps.info.outputs.version }} textLink: ${{ steps.info.outputs.name }} - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true