Skip to content

Commit 6831ec8

Browse files
committed
Fix env context errors
1 parent bc58e73 commit 6831ec8

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ defaults:
1313

1414
env:
1515
DOCKER_IMAGE: ${{ secrets.DOCKER_USERNAME }}/system-monitor
16-
CACHE_KEY: cmake-${{ hashFiles('**/CMakeLists.txt') }}-${{ hashFiles('**/*.cpp', '**/*.h') }}
1716

1817
jobs:
1918
# BUILD & CACHE
@@ -27,6 +26,11 @@ jobs:
2726
- name: Checkout
2827
uses: actions/checkout@v4
2928

29+
- name: Generate cache key
30+
id: cache-key
31+
run: |
32+
echo "key=${RUNNER_OS}-cmake-$(sha256sum CMakeLists.txt | cut -d' ' -f1)" >> $GITHUB_OUTPUT
33+
3034
- name: Install dependencies
3135
run: |
3236
sudo apt-get update -qq
@@ -41,7 +45,7 @@ jobs:
4145
build/
4246
!build/**/*.o
4347
!build/**/*.tmp
44-
key: ${{ env.CACHE_KEY }}
48+
key: ${{ steps.cache-key.outputs.key }}
4549

4650
- name: Configure CMake
4751
if: steps.cache.outputs.cache-hit != 'true'

0 commit comments

Comments
 (0)