Cache: Using v2 vs v2.1.3

Created on 6 Jan 2021  路  5Comments  路  Source: actions/cache

An action I am using, uses by default actions/cache@v1.

When I configured Dependabot, it created a PR with an update to actions/[email protected].

I saw on the page of actions/cache, the version in the example code is v2 and not the latest release v2.1.3.

Should I update to v2.1.3 or is there a specific reason to use v2 instead, as showed in the example code ?

Most helpful comment

(I realized there's a second possible interpretation of your last question. This way of versioning, where we have a "major version" tag such as @v2 that points to the latest patch version, is something we do manually for the official GitHub actions. This is not automatically done for all actions.)

All 5 comments

We update the v2 tag to point to the latest release, so currently v2 is the same as v2.1.3. We recommend using v2 so you are always using the latest version.

We update the v2 tag to point to the latest release, so currently v2 is the same as v2.1.3. We recommend using v2 so you are always using the latest version.

Does that apply automatically to all actions or do you do it for yourself manually ?

Yes, when we change the tag all uses of actions/cache@v2 in any workflow will automatically start using the new version.

(Edited for clairty)

(I realized there's a second possible interpretation of your last question. This way of versioning, where we have a "major version" tag such as @v2 that points to the latest patch version, is something we do manually for the official GitHub actions. This is not automatically done for all actions.)

Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

s-weigand picture s-weigand  路  5Comments

binhxn picture binhxn  路  3Comments

thisismydesign picture thisismydesign  路  4Comments

gladhorn picture gladhorn  路  4Comments

Lyeeedar picture Lyeeedar  路  5Comments