Skip to content

Commit

Permalink
ci: approve on success
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode committed Oct 5, 2023
1 parent 283e0b0 commit bd8837c
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/auto-wait-successful.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,25 @@ name: 🤖 Auto approve when success
on:
workflow_run:
workflows: ['⚙️ Build demo', '⚙️ Build lib', '⚙️ Lint', '⚙️ Tests']
branches-ignore: [main]
types: [completed]
types:
- completed

jobs:
on-success:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
if: ${{ github.event.workflow_run.conclusion == 'success' && github.ref != 'refs/heads/main' }}
steps:
- run: echo 'The triggering workflow passed'
- uses: taiga-family/ci/actions/setup/[email protected]
- uses: taiga-family/ci/actions/setup/[email protected]
- uses: taiga-family/ci/actions/auto/approve/[email protected]
if: env.TAIGA_FAMILY_BOT_IS_AUTHOR == 'true'
with:
token1: ${{ secrets.GITHUB_TOKEN }}
token2: ${{ secrets.TAIGA_FAMILY_APPROVE_BOT_PAT }}

on-failure:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
if: ${{ github.event.workflow_run.conclusion == 'failure' && github.ref != 'refs/heads/main' }}
steps:
- run: echo 'The triggering workflow failed'

0 comments on commit bd8837c

Please sign in to comment.