-
Notifications
You must be signed in to change notification settings - Fork 478
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: wait job status before bot approve
- Loading branch information
Showing
5 changed files
with
41 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,46 @@ | ||
name: 🤖 Auto approve by bot | ||
name: 🤖 Auto approve validation | ||
on: pull_request | ||
|
||
env: | ||
JOBS_NAME: '[ "Build packages", "Firebase", "Lint", "Collect coverage", "E2E result" ]' | ||
|
||
jobs: | ||
automated-pull-request: | ||
setup: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: write | ||
outputs: | ||
matrix: ${{ steps.matrix.outputs.value }} | ||
steps: | ||
- uses: actions/checkout@v4.1.0 | ||
- uses: taiga-family/ci/actions/setup/variables@v1.23.0 | ||
- uses: taiga-family/ci/actions/auto/approve/[email protected] | ||
- uses: taiga-family/ci/actions/setup/checkout@v1.24.1 | ||
- uses: taiga-family/ci/actions/setup/variables@v1.24.1 | ||
- id: matrix | ||
if: env.TAIGA_FAMILY_BOT_IS_AUTHOR == 'true' | ||
run: echo "value=$JOBS_NAME" >> $GITHUB_OUTPUT | ||
|
||
wait: | ||
needs: [setup] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
value: ${{ fromJSON(needs.setup.outputs.matrix) }} | ||
steps: | ||
- uses: taiga-family/ci/actions/run/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
job: ${{ matrix.value }} | ||
|
||
approve: | ||
needs: [wait] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: taiga-family/ci/actions/auto/approve/[email protected] | ||
with: | ||
token1: ${{ secrets.GITHUB_TOKEN }} | ||
token2: ${{ secrets.TAIGA_FAMILY_APPROVE_BOT_PAT }} | ||
- uses: taiga-family/ci/actions/run/[email protected] | ||
with: | ||
token: ${{ secrets.TAIGA_FAMILY_APPROVE_BOT_PAT }} | ||
|
||
concurrency: | ||
group: auto-approve-${{ github.head_ref }} | ||
cancel-in-progress: true |
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 |
---|---|---|
|
@@ -7,7 +7,7 @@ on: | |
jobs: | ||
build: | ||
if: ${{ !contains(github.head_ref, 'release/') }} | ||
name: Packages | ||
name: Build packages | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
|
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
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 |
---|---|---|
|
@@ -41,6 +41,7 @@ jobs: | |
path: coverage | ||
|
||
codecov: | ||
name: Collect coverage | ||
needs: [test] | ||
runs-on: ubuntu-latest | ||
steps: | ||
|