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 2021/03/11 12:28:25 UTC

[GitHub] [airflow] ashb commented on a change in pull request #14718: Don't use author_association for self-hosted vs public runner decision.

ashb commented on a change in pull request #14718:
URL: https://github.com/apache/airflow/pull/14718#discussion_r592319392



##########
File path: .github/workflows/ci.yml
##########
@@ -127,10 +159,23 @@ jobs:
       pullRequestLabels: ${{ steps.source-run-info.outputs.pullRequestLabels }}
       runsOn: ${{ steps.set-runs-on.outputs.runsOn }}
     steps:
-      # Avoid having to specify the runs-on logic every time
+      # Avoid having to specify the runs-on logic every time. We use the custom
+      # env var AIRFLOW_SELF_HOSTED_RUNNER set only on our runners, but never
+      # on the public runners
       - name: Set runs-on
         id: set-runs-on
-        run: echo "::set-output name=runsOn::$(jq -n 'env.RUNS_ON')"
+        run: |
+          set -x
+          echo "$AIRFLOW_SELF_HOSTED_RUNNER"
+          echo "$GITHUB_EVENT_NAME"
+          echo "::set-output name=runsOn::$(jq -n '
+            if env.AIRFLOW_SELF_HOSTED_RUNNER and (["push", "schedule"] | index(env.GITHUB_EVENT_NAME)) then

Review comment:
       Whops. `or` not `and` here!




----------------------------------------------------------------
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