GitHub Actions: The Marketplace and Version Pins
The Marketplace is the shared library of actions on GitHub. A version pin fixes which release of an action a workflow uses.
A stale pin
Many old guides show this pin. It is out of date.
- uses: actions/checkout@v4A current pin
This pin follows the latest v7 release.
- uses: actions/checkout@v7Pin every action in one workflow
Pin each action at the same major version.
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
- uses: actions/setup-python@v7Example
name: Pinned versions
on: push
jobs:
pinned:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: '24'
- run: npm testKey points
- Marketplace: the shared library where actions are published.
- A version pin is the tag after the @ sign, like @v7.
- Use @v7 to follow the latest v7 release.
- Most 2025 guides still show @v4, which is now stale.
- upload-artifact v1 and v2 stopped working after 30 June 2024.
- A SHA pin fixes one exact commit of an action.
- A SHA is the long code that names one commit. It is the strictest pin, but it is hard to read.
- Check the Marketplace for the current major version before copying a workflow.
- A pin says exactly which action code runs. Stale pins are the commonest copy-paste failure.
In this example, the workflow runs on every push. Every action is pinned at @v7. Checkout downloads the repo. Setup-node installs Node 24. The last step runs the tests, which pass. No stale pin is left in the file.
Note
This course pins checkout, setup-node and setup-python at @v7.
Try it Yourself
Edit the code, then press Run.
Running is simulated · Rust Playground
Exercise
Why is copying @v4 from an old guide a problem?