Skip to content

Commit

Permalink
No need to download Spark if we are not saving the cache
Browse files Browse the repository at this point in the history
  • Loading branch information
EnricoMi committed Nov 4, 2024
1 parent 1e569c8 commit 080cb04
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ runs:

# merely populate the cache for test-jvm and test-python actions
- name: Restore Spark Binaries cache
if: github.event_name != 'schedule' && ! contains(inputs.spark-version, '-SNAPSHOT')
if: github.event_name != 'schedule' && github.ref == 'refs/heads/master' && ! contains(inputs.spark-version, '-SNAPSHOT')
uses: actions/cache/restore@v4
with:
path: ~/spark
Expand All @@ -71,7 +71,7 @@ runs:
${{ runner.os }}-spark-binaries-${{ inputs.spark-version }}-${{ inputs.scala-compat-version }}

- name: Setup Spark Binaries
if: ( ! contains(inputs.spark-version, '-SNAPSHOT') )
if: github.event_name != 'schedule' && github.ref == 'refs/heads/master' && ! contains(inputs.spark-version, '-SNAPSHOT')
env:
SPARK_PACKAGE: spark-${{ inputs.spark-version }}/spark-${{ inputs.spark-version }}-bin-hadoop${{ inputs.hadoop-version }}${{ inputs.scala-compat-version == '2.13' && '-scala2.13' || '' }}.tgz
run: |
Expand All @@ -83,7 +83,7 @@ runs:
shell: bash

- name: Save Spark Binaries cache
if: github.event_name != 'schedule' && github.ref == 'refs/heads/master'
if: github.event_name != 'schedule' && github.ref == 'refs/heads/master' && ! contains(inputs.spark-version, '-SNAPSHOT')
uses: actions/cache/save@v4
with:
path: ~/spark
Expand Down

0 comments on commit 080cb04

Please sign in to comment.