If you're not specific which version to use of an action in a Github workflow, will it use the latest version? #48058
-
Select Topic AreaQuestion BodyHi everyone, I have a question regarding specifying a version to use when using a Github actions package. Let's assume I have the a simple workflow file that contains a step where I use an action. steps:
- name: Checkout code
uses: actions/checkout@v3 Here I define the version to be use to be My question is, if you just define the version as Thanks in advance and sorry if this has already been asked. I tried to search it but couldn't find the answer. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
The answer is that it depends on the repository the action is in. The part after the If you look at the list of tags for But keep in mind: It's completely up to the maintainers of the action repository, there's no version parsing involved. |
Beta Was this translation helpful? Give feedback.
The answer is that it depends on the repository the action is in. The part after the
@
must be a valid Git ref (branch or tag name) or commit ID in the action repository.actions/checkout@v3
will simply use whichever commit thev3
tag or branch in theactions/checkout
repository points at.If you look at the list of tags for
actions/checkout
, you can see that currently (as I'm writing this) thev3
andv3.3.0
tags point at the same commit:But keep in mind: It's completely up to the maintainers of the action repository, there's no version parsing involved.⚠️