Skip to content

Commit d4051b8

Browse files
SCANPY-220 Migrated to using gh-action_cache as suggested by warning messages. Fixed race condition w.r.t. cache.
1 parent 33988d7 commit d4051b8

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

.github/actions/config-poetry/action.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,13 @@ runs:
3737
- uses: SonarSource/ci-github-actions/get-build-number@v1
3838
id: get_build_number
3939
- name: Cache local Poetry cache
40-
uses: SonarSource/ci-github-actions/cache@v1
40+
uses: SonarSource/gh-action_cache@v1
4141
with:
4242
path: ${{ inputs.poetry-cache-dir }}
43-
key: poetry-${{ runner.os }}-${{ hashFiles('poetry.lock') }}
44-
restore-keys: poetry-${{ runner.os }}-
43+
key: poetry-${{ runner.os }}-${{ inputs.python-version }}-${{ hashFiles('poetry.lock') }}
44+
restore-keys: |
45+
poetry-${{ runner.os }}-${{ inputs.python-version }}-
46+
poetry-${{ runner.os }}-
4547
4648
# python needs to be installed before jfrog and poetry
4749
# (see https://xtranet-sonarsource.atlassian.net/wiki/spaces/Platform/pages/4344217683/Mise+Poetry+Install+-+GitHub)

.github/workflows/MacOsNightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
uses: SonarSource/gh-action_setup-cloudflare-warp@v1
6666

6767
- name: Cache SonarQube
68-
uses: SonarSource/ci-github-actions/cache@v1
68+
uses: SonarSource/gh-action_cache@v1
6969
id: sonarqube-cache
7070
with:
7171
path: sonarqube_cache/

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,12 +179,12 @@ jobs:
179179
- name: Checkout repository
180180
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
181181
- name: Cache SonarQube
182-
uses: SonarSource/ci-github-actions/cache@v1
182+
uses: SonarSource/gh-action_cache@v1
183183
id: sonarqube-cache
184184
with:
185185
path: sonarqube_cache/
186-
key: sonarqube-25.3.0.104237
187-
restore-keys: cache-${{ runner.os }}-
186+
key: sonarqube-${{ env.SONARQUBE_VERSION }}
187+
restore-keys: sonarqube-
188188
- name: Download SonarQube
189189
if: ${{ !steps.sonarqube-cache.outputs.cache-hit }}
190190
run: |

0 commit comments

Comments
 (0)