ams
ams

Reputation: 62632

How does GitHub Actions Workflow resolve minor versions of an actions?

In GitHub job workflows a github action is typically referenced by version for example actions/checkout@v3

jobs:
  build:
    steps:
      - name: Checkout repository
        uses: actions/checkout@v3

when I visit the Action's releases page I see that the current version is 3.2.0.

Questions:

Upvotes: 4

Views: 1716

Answers (1)

Matt
Matt

Reputation: 13923

It uses the explicitly specified version or tag. For a public action the format is {owner}/{repo}@{ref} in which {ref} can be a Git tag, branch or SHA. See the relevant documentation for more details.

Whether a GitHub Action offers major tags (e.g. v3) is at the discretion of the action maintainers. If it is offered, usually the major tag is force pushed to point to the same commit as the new minor version tag when a new minor version is released.

For example, actions/checkout has a helper workflow (see update-main-version) which can be manually triggered to do this. Many other actions use actions/publish-action despite currently being in alpha development and GitHub does "[...] not recommend this action for public or production usage while it is still in development." The purpose is to update the major version tag or create a new one if it does not exist yet.

Upvotes: 7

Related Questions