Skip to content

Commit 429c445

Browse files
committed
Dont build if cache-hit occurs on push to fork main, the cache wont be updated.
The scheduled job means a new cache is created 10mins into the month. Due to the monthly fixed key, a cache hit will occur on every push to main in the same month after the cache is populated. The cache will not be updated if there was a hit, even if the local repo contents have changed, so running the build does nothing in terms of refreshing the cache.
1 parent 9a520b9 commit 429c445

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.github/workflows/ci-fork-mvn-cache.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,10 @@ jobs:
5555
# refresh cache every month to avoid unlimited growth
5656
key: q2maven-${{ steps.get-date.outputs.date }}
5757
- name: Build
58+
if: steps.cache-maven.outputs.cache-hit != 'true'
5859
run: |
5960
./mvnw -T1C -e -B --settings .github/mvn-settings.xml -Dquickly-ci -Dtcks clean install
6061
- name: Delete Local Artifacts From Cache
62+
if: steps.cache-maven.outputs.cache-hit != 'true'
6163
shell: bash
6264
run: rm -r ~/.m2/repository/io/quarkus

0 commit comments

Comments
 (0)