Files
github-slug-action/docs/how-to/migrate-v3-to-v4.md
2026-03-12 14:02:09 +01:00

1.1 KiB

Migrate from v3 to v4

The main breaking change in v4 is that short SHA length is now determined by Git instead of being fixed at 8 characters.

What changed

Since v4, Git manages the short variables using git rev-parse behaviour. The length of a short SHA depends on the size of your repository and can change over time as the repository grows.

How to migrate

To reproduce the previous fixed-length behaviour, set short-length to 8:

steps:
  - name: Inject enhanced GitHub environment variables
    uses: rlespinasse/github-slug-action@v5
    with:
      short-length: 8 # Same as v3 and before

Other options:

  • Set 7 to reproduce small repository behaviour
  • Leave empty to let Git decide (recommended)

Warning

The minimum length is 4. The default is the effective value of the core.abbrev Git configuration variable.