This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch v1-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 20512aff626a04a418ccef5861b6856ac0c3e215
Author: Jarek Potiuk <jarek.pot...@polidea.com>
AuthorDate: Sun Nov 8 13:25:32 2020 +0100

    Adds extra check while the selective checks are run (#12178)
    
    The selective checks are run in "workflow_run" because
    they need to be able to set label and make comments, however
    status of those checks are not displayed in GitHub and in
    cases of small PRs the "merge" button might be green before
    the status complete.
    
    This PR adds additional check that is always completed after
    the "worfklow_run" finishes it's job. This will prevent
    accidental merges before the check completes.
    
    (cherry picked from commit 63ac07d9c735b1ccc8aa5fa974a260cc944cc539)
---
 .../workflows/label_when_reviewed_workflow_run.yml | 29 ++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/.github/workflows/label_when_reviewed_workflow_run.yml 
b/.github/workflows/label_when_reviewed_workflow_run.yml
index cdcbca5..c2359c8 100644
--- a/.github/workflows/label_when_reviewed_workflow_run.yml
+++ b/.github/workflows/label_when_reviewed_workflow_run.yml
@@ -35,6 +35,20 @@ jobs:
         with:
           token: ${{ secrets.GITHUB_TOKEN }}
           sourceRunId: ${{ github.event.workflow_run.id }}
+      - name: Initiate Selective Build check
+        uses: 
LouisBrunner/checks-action@9f02872da71b6f558c6a6f190f925dde5e4d8798  # v1.1.0
+        id: selective-build-check
+        with:
+          token: ${{ secrets.GITHUB_TOKEN }}
+          name: "Selective build check"
+          status: "in_progress"
+          sha: ${{ steps.source-run-info.outputs.sourceHeadSha }}
+          details_url: https://github.com/${{ github.repository 
}}/actions/runs/${{ github.run_id }}
+          output: >
+            {"summary":
+            "Checking selective status of the build in
+            [the run](https://github.com/${{ github.repository 
}}/actions/runs/${{ github.run_id }})
+            "}
       - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
         uses: actions/checkout@v2
       - name: >
@@ -125,3 +139,18 @@ jobs:
           pullRequestNumber: ${{ 
steps.source-run-info.outputs.pullRequestNumber }}
           require_committers_approval: 'true'
           comment: "The PR is ready to be merged. No tests are needed!"
+      - name: Update Selective Build check
+        uses: 
LouisBrunner/checks-action@9f02872da71b6f558c6a6f190f925dde5e4d8798  # v1.1.0
+        if: always()
+        with:
+          token: ${{ secrets.GITHUB_TOKEN }}
+          check_id: ${{ steps.selective-build-check.outputs.check_id }}
+          status: "completed"
+          sha: ${{ steps.source-run-info.outputs.sourceHeadSha }}
+          conclusion: ${{ job.status }}
+          details_url: https://github.com/${{ github.repository 
}}/actions/runs/${{ github.run_id }}
+          output: >
+            {"summary":
+            "Checking selective status of the build completed in
+            [the run](https://github.com/${{ github.repository 
}}/actions/runs/${{ github.run_id }})
+            "}

Reply via email to