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 8c731b8723efcff40947c2331b5055ab96df8e9e Author: Jarek Potiuk <[email protected]> AuthorDate: Mon Oct 5 18:35:24 2020 +0200 Switched to Run Checks for Building Images. (#11276) Replaces the annoying comments with "workflow_run" links with Run Checks. Now we will be able to see the "Build Image" checks in the "Checks" section including their status and direct link to the steps running the image builds as "Details" link. Unfortunately Github Actions do not handle well the links to details - even if you provide details_url to link to the other run, the "Build Image" checks appear in the original workflow, that's why we had to introduce another link in the summary of the Build Image check that links to the actual workflow. (cherry picked from commit a33a91951b731f1a5496be08e47d503527382968) --- .github/workflows/build-images-workflow-run.yml | 35 +++++++++++++++++++++---- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-images-workflow-run.yml b/.github/workflows/build-images-workflow-run.yml index 9976eac..dad3e3a 100644 --- a/.github/workflows/build-images-workflow-run.yml +++ b/.github/workflows/build-images-workflow-run.yml @@ -66,11 +66,6 @@ jobs: cancelMode: duplicates sourceRunId: ${{ github.event.workflow_run.id }} notifyPRCancel: true - notifyPRMessageStart: | - The CI and PROD Docker Images for the build are prepared in a separate "Build Image" workflow, - that you will not see in the list of checks (you will see "Wait for images" jobs instead). - - You can checks the status of those images in - name: "Output BUILD_IMAGES" id: build-images run: | @@ -274,6 +269,21 @@ jobs: else echo "::set-output name=proceed::false" fi + - name: Initiate Github Checks for Building image + uses: LouisBrunner/[email protected] + id: build-image-check + with: + token: ${{ secrets.GITHUB_TOKEN }} + name: "Status of image build ${{ matrix.image-type }}: ${{ matrix.python-version }}" + status: "in_progress" + sha: ${{ needs.cancel-workflow-runs.outputs.sourceHeadSha }} + details_url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} + output: > + {"summary": + "Building the image: ${{ matrix.image-type }}: ${{ matrix.python-version }}. See the + [Image Build](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) + for details" } + if: steps.defaults.outputs.proceed == 'true' - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} ) to 'main-airflow' to use main scripts" uses: actions/checkout@v2 with: @@ -307,6 +317,21 @@ jobs: - name: "Push PROD images ${{ matrix.python-version }}:${{ github.event.workflow_run.id }}" run: ./scripts/ci/images/ci_push_production_images.sh if: matrix.image-type == 'PROD' && steps.defaults.outputs.proceed == 'true' + - name: Update Github Checks for Building image with status + uses: LouisBrunner/[email protected] + if: always() && steps.defaults.outputs.proceed == 'true' + with: + token: ${{ secrets.GITHUB_TOKEN }} + check_id: ${{ steps.build-image-check.outputs.check_id }} + status: "completed" + sha: ${{ needs.cancel-workflow-runs.outputs.sourceHeadSha }} + conclusion: ${{ job.status }} + details_url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} + output: > + {"summary": + "Building the image: ${{ matrix.image-type }}: ${{ matrix.python-version }}. See the + [Image Build](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) + for details" } cancel-on-build-failure: name: "Cancel 'CI Build' jobs on build image failure"
