HyukjinKwon commented on a change in pull request #33410:
URL: https://github.com/apache/spark/pull/33410#discussion_r671997638



##########
File path: .github/workflows/build_and_test.yml
##########
@@ -5,11 +5,46 @@ on:
     branches:
     - '**'
     - '!branch-*.*'
+  schedule:
+    # master
+    - cron: '0 0 * * *'
+    # branch-3.2
+    - cron: '0 1 * * *'
 
 jobs:
+  configure-jobs:
+    name: Configure jobs
+    runs-on: ubuntu-20.04
+    outputs:
+      should_run: ${{ steps.set-outputs.outputs.should_run }}
+      branch: ${{ steps.set-outputs.outputs.branch }}
+      envs: ${{ steps.set-outputs.outputs.envs }}
+    env:
+      SCHEDULE: ${{ github.event.schedule }}
+    steps:
+    - name: Configure branch and additional environment variables
+      id: set-outputs
+      run: |
+        if [ "$SCHEDULE" = "0 0 * * *" ]; then
+          echo '::set-output name=branch::master'
+          echo '::set-output name=envs::{"SCALA_PROFILE": "scala2.13"}'
+          echo '::set-output name=should_run::${{ github.repository == 
'apache/spark' }}'
+        elif [ "$SCHEDULE" = "0 1 * * *" ]; then
+          echo '::set-output name=branch::branch-3.2"
+          echo '::set-output name=envs::{"SCALA_PROFILE": "scala2.13"}'
+          echo '::set-output name=should_run::${{ github.repository == 
'apache/spark' }}'
+        else
+          echo '::set-output name=branch::master' # Default branch to run on. 
CHANGE here when a branch is cut out.
+          echo '::set-output name=envs::{}'
+          echo '::set-output name=should_run::true'
+        fi
+
   # Build: build Spark and run the tests for specified modules.
   build:
     name: "Build modules: ${{ matrix.modules }} ${{ matrix.comment }} (JDK ${{ 
matrix.java }}, ${{ matrix.hadoop }}, ${{ matrix.hive }})"

Review comment:
       Probably we could use this to filter out as well:
   <img width="405" alt="Screen Shot 2021-07-19 at 2 32 23 PM" 
src="https://user-images.githubusercontent.com/6477701/126107839-b0ab5def-1ca5-4715-be87-f968886a4744.png";>
   
   Let me think about a way and push some changes soon.




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

To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to