Skip to content

Commit 15d33be

Browse files
vvolklocaisa
andauthored
Add arch to apt cache key (#34)
Fixes possible inconsistencies in caches between arm and x86_64 runners, which can cause errors like: ``` The following packages have unmet dependencies: attr : Depends: libattr1 (= 1:2.5.2-1build1) but 1:2.5.2-1build1.1 is to be installed libdebuginfod1t64 : Depends: libelf1t64 (= 0.190-1.1build4) but 0.190-1.1build4.1 is to be installed Depends: libdw1t64 (= 0.190-1.1build4) but 0.190-1.1build4.1 is to be installed uuid-dev : Depends: libuuid1 (= 2.39.3-9ubuntu6.1) but 2.39.3-9ubuntu6.2 is to be installed E: Unable to correct problems, you have held broken packages. ``` --------- Co-authored-by: ocaisa <[email protected]>
1 parent 204fd62 commit 15d33be

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,13 +340,15 @@ runs:
340340
echo "codename=${DISTRIB_CODENAME}" >> $GITHUB_OUTPUT
341341
echo "description=${DISTRIB_DESCRIPTION}" >> $GITHUB_OUTPUT
342342
echo "id-release=${DISTRIB_ID}-${DISTRIB_DESCRIPTION}" >> $GITHUB_OUTPUT
343+
echo "arch=$(uname -m)" >> $GITHUB_OUTPUT
343344
elif [ "$RUNNER_OS" == "macOS" ]; then
344345
echo "id-release=macOS-$(sw_vers -productVersion)" >> $GITHUB_OUTPUT
346+
echo "arch=$(uname -m)" >> $GITHUB_OUTPUT
345347
fi
346348
shell: bash
347349
- uses: actions/cache@v4
348350
with:
349-
key: cvmfs-apt-cache-${{ steps.lsb-release.outputs.id-release }}-${{ hashFiles('action.yml') }}
351+
key: cvmfs-apt-cache-${{ steps.lsb-release.outputs.id-release }}-${{ steps.lsb-release.outputs.arch }}-${{ hashFiles('action.yml') }}
350352
path: |
351353
${{ inputs.apt_cache }}
352354
- run: |

0 commit comments

Comments
 (0)