diff --git a/.github/workflows/auto-approve.yml b/.github/workflows/auto-approve.yml index ebb8e3310..e44cae79b 100644 --- a/.github/workflows/auto-approve.yml +++ b/.github/workflows/auto-approve.yml @@ -9,6 +9,54 @@ jobs: steps: - uses: taiga-family/ci/actions/setup/checkout@v1.23.0 - uses: taiga-family/ci/actions/setup/variables@v1.23.0 + - name: Wait for build to succeed + uses: fountainhead/action-wait-for-check@v1.1.0 + id: wait1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + checkName: build + ref: ${{ github.event.pull_request.head.sha || github.sha }} + timeoutSeconds: 3600 + intervalSeconds: 60 + - name: Wait for build to succeed + if: steps.wait1.outputs.conclusion == 'success' + uses: fountainhead/action-wait-for-check@v1.1.0 + id: wait2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + checkName: build-demo + ref: ${{ github.event.pull_request.head.sha || github.sha }} + timeoutSeconds: 3600 + intervalSeconds: 60 + - name: Wait for build to succeed + if: steps.wait2.outputs.conclusion == 'success' + uses: fountainhead/action-wait-for-check@v1.1.0 + id: wait3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + checkName: lint + ref: ${{ github.event.pull_request.head.sha || github.sha }} + timeoutSeconds: 3600 + intervalSeconds: 60 + - name: Wait for build to succeed + if: steps.wait3.outputs.conclusion == 'success' + uses: fountainhead/action-wait-for-check@v1.1.0 + id: wait-for-build + with: + token: ${{ secrets.GITHUB_TOKEN }} + checkName: tests + ref: ${{ github.event.pull_request.head.sha || github.sha }} + timeoutSeconds: 3600 + intervalSeconds: 60 + + - name: Do something with a passing build + if: steps.wait-for-build.outputs.conclusion == 'success' + run: echo 'success' + + - name: Do something with a failing build + if: steps.wait-for-build.outputs.conclusion == 'failure' + run: echo 'failure' + - uses: taiga-family/ci/actions/auto/approve/double@v1.23.0 if: env.TAIGA_FAMILY_BOT_IS_AUTHOR == 'true' with: diff --git a/.github/workflows/auto-wait-successful.yml b/.github/workflows/auto-wait-successful.yml deleted file mode 100644 index 653fb5d6d..000000000 --- a/.github/workflows/auto-wait-successful.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: 🤖 Auto approve when success - -on: - workflow_run: - workflows: ['⚙️ Build demo', '⚙️ Build lib', '⚙️ Lint', '⚙️ Tests'] - types: - - completed - -jobs: - on-success: - runs-on: ubuntu-latest - steps: - - run: echo 'The triggering workflow passed' - - run: echo '${{ github.event.workflow_run.conclusion }}' - - run: echo '${{ github.ref }}' - - uses: taiga-family/ci/actions/setup/checkout@v1.23.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 }} - - on-failure: - runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'failure' && github.ref != 'refs/heads/main' }} - steps: - - run: echo 'The triggering workflow failed' - - uses: actions/github-script@v5 - continue-on-error: true - with: - github-token: ${{ github.token }} - script: | - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: '⛔ Some workflows failed, we can’t use auto approve for here!' - }) diff --git a/.github/workflows/build-demo.yml b/.github/workflows/build-demo.yml index fece4f74f..e8fd45cf5 100644 --- a/.github/workflows/build-demo.yml +++ b/.github/workflows/build-demo.yml @@ -6,7 +6,7 @@ on: - main jobs: - build: + build-demo: runs-on: ubuntu-latest steps: - uses: taiga-family/ci/actions/setup/checkout@v1.23.0 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9319b841d..5eb925f49 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,7 +8,6 @@ on: jobs: build: runs-on: ubuntu-latest - name: Build libs steps: - uses: taiga-family/ci/actions/setup/checkout@v1.23.0 - uses: taiga-family/ci/actions/setup/variables@v1.23.0 diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index d5468ce54..ee77bad88 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -1,6 +1,6 @@ name: ⚙️ E2E on: - workflow_dispatch: + pull_request: env: CYPRESS_failOnSnapshotDiff: 0 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f437ec00e..39451b918 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,7 +7,6 @@ on: jobs: tests: - name: Unit tests runs-on: ubuntu-latest steps: - uses: taiga-family/ci/actions/setup/checkout@v1.23.0