You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/09/14 16:05:09 UTC
[GitHub] [airflow] potiuk commented on a change in pull request #10912: Fixes retrieval of correct branch in non-master related builds
potiuk commented on a change in pull request #10912:
URL: https://github.com/apache/airflow/pull/10912#discussion_r488049915
##########
File path: .github/workflows/build-images-workflow-run.yml
##########
@@ -209,6 +209,18 @@ jobs:
uses: actions/checkout@v2
with:
ref: ${{ needs.cancel-workflow-runs.outputs.sourceHeadSha }}
+ - name: "Retrieve DEFAULTS from the _initialization.sh"
+ # We cannot "source" the script here because that would be a security problem (we cannot run
+ # any code that comes from the sources coming from the PR. Therefore we extract the
+ # DEFAULT_BRANCH and DEFAULT_CONSTRAINTS_BRANCH via custom grep/awk/sed commands
+ run: |
+ DEFAULT_BRANCH=$(grep "export DEFAULT_BRANCH" scripts/ci/libraries/_initialization.sh | \
+ awk 'BEGIN{FS="="} {print $3}' | sed s'/["}]//g')
Review comment:
Not really the form of it is export DEFAULT_BRANCH=${DEFAULT_BRANCH:="master"} so that it can be overridden.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org