You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2021/06/22 19:25:11 UTC

[airflow] 33/47: Checks-out missing commits on selective checks (#16470)

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

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

commit f744b6c7c22fb8216cc075263f544e58cf20020c
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Thu Jun 17 02:00:24 2021 +0200

    Checks-out missing commits on selective checks (#16470)
    
    Recent improvement of the build images to use pull_request_target
    removed by accident fetching of the PR commits which makes it
    impossible to determine which files has changed in PR in the
    PR build image workflow.
    
    This commit brings it back.
    
    (cherry picked from commit b11166b62853351c33c2bc6e6edd4ba6aea8411d)
---
 .github/workflows/build-images.yml | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/.github/workflows/build-images.yml b/.github/workflows/build-images.yml
index 34ddcc3..e451f87 100644
--- a/.github/workflows/build-images.yml
+++ b/.github/workflows/build-images.yml
@@ -75,6 +75,13 @@ jobs:
       cacheDirective: ${{ steps.dynamic-outputs.outputs.cacheDirective }}
       targetBranch: ${{ steps.dynamic-outputs.outputs.targetBranch }}
     steps:
+      # Retrieve it to be able to determine which files has changed in the incoming commit of the PR
+      # we checkout the target commit and it's parent to be able to compare them
+      - uses: actions/checkout@v2
+        with:
+          ref: ${{ env.TARGET_COMMIT_SHA }}
+          persist-credentials: false
+          fetch-depth: 2
       - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
         uses: actions/checkout@v2
         with: