Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode committed Oct 5, 2023
1 parent 8c763e9 commit 3f257d3
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 14 deletions.
56 changes: 43 additions & 13 deletions .github/workflows/auto-approve.yml
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", "Lint" ]'

jobs:
automated-pull-request:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4.1.0
- uses: taiga-family/ci/actions/setup/variables@v1.23.0
- uses: taiga-family/ci/actions/auto/approve/double@v1.23.0
if: env.TAIGA_FAMILY_BOT_IS_AUTHOR == 'true'
with:
token1: ${{ secrets.GITHUB_TOKEN }}
token2: ${{ secrets.TAIGA_FAMILY_APPROVE_BOT_PAT }}
setup:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.matrix.outputs.value }}
steps:
- 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/wait-job@v1.24.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
job: ${{ matrix.value }}

approve:
needs: [wait]
runs-on: ubuntu-latest
steps:
- uses: taiga-family/ci/actions/auto/approve/double@v1.24.1
with:
token1: ${{ secrets.GITHUB_TOKEN }}
token2: ${{ secrets.TAIGA_FAMILY_APPROVE_BOT_PAT }}
- uses: taiga-family/ci/actions/run/merge@v1.25.1
with:
token: ${{ secrets.TAIGA_FAMILY_APPROVE_BOT_PAT }}

concurrency:
group: auto-approve-${{ github.head_ref }}
cancel-in-progress: true
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
build:
name: libs
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.0
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.0
Expand Down

0 comments on commit 3f257d3

Please sign in to comment.