Replies: 1 comment
-
Hi @eirrgang. To include the specific version of the Ubuntu release in the cache key, you can use a shell command to obtain the release version, and then utilize that information in the cache action. Here's an example of how you might achieve this: jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Get Ubuntu version
id: ubuntu-version
run: echo "UBUNTU_VERSION=$(lsb_release -rs)" >> $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v2
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.cache
key: ubuntu-${{ env.UBUNTU_VERSION }}-${{ hashFiles('**/lockfiles') }} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I saw that the release associated with the
ubuntu-latest
image will be changing (actions/runner-images#6399) but I can't find a context, expression, or (default) environment variable that I could include in my cache key to distinguish the environment after the update.Suggestions?
Beta Was this translation helpful? Give feedback.
All reactions