Skip to content

Commit

Permalink
ci: use different caches for self-hosted runners
Browse files Browse the repository at this point in the history
  • Loading branch information
oleschoenburg committed Apr 27, 2023
1 parent 3e7129b commit 7fa26fc
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/actions/setup-zeebe/action.yml
Expand Up @@ -116,13 +116,21 @@ runs:
-D maven.artifact.threads=32
EOF
- name: Cache local Maven repository
if: inputs.java == 'true'
if: inputs.java == 'true' && !startsWith(runner.name, 'actions-runner-')
uses: actions/cache@v3
with:
path: ~/.m2/repository/cached/releases/
key: self-hosted-${{ runner.os }}-mvn-${{ inputs.maven-cache-key-modifier }}-${{ hashFiles('**/pom.xml') }}
restore-keys: |
self-hosted-${{ runner.os }}-mvn-${{ inputs.maven-cache-key-modifier }}
- name: Cache local Maven repository
if: inputs.java == 'true' && startsWith(runner.name, 'actions-runner-')
uses: actions/cache@v3
with:
path: ~/.m2/repository/cached/releases/
key: ${{ runner.os }}-mvn-${{ inputs.maven-cache-key-modifier }}-${{ hashFiles('**/pom.xml') }}
key: gh-hosted-${{ runner.os }}-mvn-${{ inputs.maven-cache-key-modifier }}-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-mvn-${{ inputs.maven-cache-key-modifier }}
gh-hosted-${{ runner.os }}-mvn-${{ inputs.maven-cache-key-modifier }}
- if: ${{ inputs.go == 'true' }}
uses: actions/setup-go@v3
with:
Expand Down

0 comments on commit 7fa26fc

Please sign in to comment.