]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
action: Use /etc/os-release as cache key instead of runner.os
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 22 May 2022 08:50:12 +0000 (10:50 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 20 Jun 2022 11:25:03 +0000 (13:25 +0200)
action.yaml

index f5a1075e1f3afcb46010f0d195bc6446c2beadca..78b073373bedbde73a9c8141c0a5b7ebd9185e0c 100644 (file)
@@ -5,11 +5,19 @@ runs:
   using: composite
   steps:
 
+  - name: Copy /etc/os-release
+    shell: bash
+    run: |
+      cp /etc/os-release $GITHUB_WORKSPACE
+      # hashFiles() only works on files inside $GITHUB_WORKSPACE so let's copy /etc/os-release to that
+      # location.
+      cat os-release
+
   - name: Cache dependencies
     uses: actions/cache@v3
     with:
       path: build
-      key: ${{ runner.os }}-${{ hashFiles('action/setup-pacman.sh') }}
+      key: ${{ hashFiles('os-release', 'action/setup-pacman.sh') }}
 
   - name: Dependencies
     shell: bash