You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
short-length: 7 # By default it's up to Git to decide, use 8 to have the v3.x behavior
71
+
short-length: 7 # By default it's up to Git to decide, use 8 to have the v3.x behaviour
72
72
```
73
73
74
+
The length of a short sha depends of the size of **your repository** and can differ over time :
75
+
76
+
- set `7` to keep the `small repository` behaviour,
77
+
- set `8` to reproduce `v3` behaviour,
78
+
- set `4` as the minimum length possible.
79
+
74
80
> [!WARNING]
75
-
> If you leave it empty, you need to checkout the source first in order to let Git decide the size by itself.
81
+
> If you leave it empty, you need to checkout the source first in order to let Git decide the size by itself by using [`git rev-parse`][git-revparse] behaviour.
82
+
>
83
+
> The default is the effective value of the [core.abbrev][git-core-abbrev] configuration variable.
76
84
77
85
## Available Environment variables
78
86
@@ -146,12 +154,12 @@ Same as slug variables but URL-compliant
146
154
The **GITHUB_REF_NAME SLUG/SLUG_URL** variables doesn't work the same way as before
147
155
148
156
> [!TIP]
149
-
> If you use `v5` or related versions, you need to use `GITHUB_REF_POINT` instead of `GITHUB_REF_NAME` to get the behavior of the `v4` action.
157
+
> If you use `v5` or related versions, you need to use `GITHUB_REF_POINT` instead of `GITHUB_REF_NAME` to get the behaviour of the `v4` action.
150
158
151
-
Before `v5`, the behavior was the same as the GitHub one except on `pull_request*` workflows ([Ready the full story][issue-104]).
159
+
Before `v5`, the behaviour was the same as the GitHub one except on `pull_request*` workflows ([Ready the full story][issue-104]).
152
160
153
-
- `${{ env.GITHUB_REF_NAME }}`will serve the behavior of this action,
154
-
- `$GITHUB_REF_NAME`will serve the behavior of GitHub Action.
161
+
- `${{ env.GITHUB_REF_NAME }}`will serve the behaviour of this action,
162
+
- `$GITHUB_REF_NAME`will serve the behaviour of GitHub Action.
155
163
156
164
On `pull_request*` workflows, the content will be `<PR-number>/merge` instead of the branch name.
157
165
So you need to use `GITHUB_REF_POINT` instead
@@ -166,23 +174,23 @@ steps:
166
174
167
175
```
168
176
169
-
Then `${{ env.GITHUB_REF_POINT }}`, and `$GITHUB_REF_POINT` will serve the behavior of this action.
170
-
And `${{ env.GITHUB_REF_NAME }}`, and `$GITHUB_REF_NAME` will serve the behavior of GitHub Action.
177
+
Then `${{ env.GITHUB_REF_POINT }}`, and `$GITHUB_REF_POINT` will serve the behaviour of this action.
178
+
And `${{ env.GITHUB_REF_NAME }}`, and `$GITHUB_REF_NAME` will serve the behaviour of GitHub Action.
171
179
172
180
### v3 to v4
173
181
174
182
Since `v4`, it's Git who manage the short variables by using [`git rev-parse`][git-revparse] behaviour.
175
-
The length of a short sha depends of the size of our repository and can differ over time.
183
+
The length of a short sha depends of the size of **your repository** and can differ over time.
176
184
177
185
To manage that moving length, you can use `short-length` input
178
186
179
-
- set `7` to reproduce `small repository` behavior
180
-
- set `8` to reproduce `v3` behavior
187
+
- set `7` to reproduce `small repository` behaviour
188
+
- set `8` to reproduce `v3` behaviour
181
189
182
190
> [!WARNING]
183
191
> The minimum length is 4, the default is the effective value of the [core.abbrev][git-core-abbrev] configuration variable.
184
192
185
-
So to reproduce previous behavior, use
193
+
So to reproduce previous behaviour, use
186
194
187
195
```yaml
188
196
steps:
@@ -199,14 +207,14 @@ steps:
199
207
> [!WARNING]
200
208
> When you set a custom environment variable, you [cannot use any of the default environment variable names][naming-conventions]. For a complete list of these, see [Default environment variables][default-environment-variables]. **If you attempt to override the value of one of these default environment variables, the assignment is ignored.**
201
209
202
-
If a variable start to be used as default environment variable, the environment variable may have a different behavior than the expected one.
210
+
If a variable start to be used as default environment variable, the environment variable may have a different behaviour than the expected one.
203
211
204
212
If this append, the `${{ env.GITHUB_AWESOME_VARIABLE }}` and `$GITHUB_AWESOME_VARIABLE` expression will not works in the same way.
205
213
206
-
- `${{ env.GITHUB_AWESOME_VARIABLE }}`will serve the behavior of this action,
207
-
- `$GITHUB_AWESOME_VARIABLE`will serve the behavior of GitHub Action.
214
+
- `${{ env.GITHUB_AWESOME_VARIABLE }}`will serve the behaviour of this action,
215
+
- `$GITHUB_AWESOME_VARIABLE`will serve the behaviour of GitHub Action.
208
216
209
-
Otherwise the two expression will serve the behavior of this action.
217
+
Otherwise the two expression will serve the behaviour of this action.
210
218
This will not occurs if you use the `prefix` input to avoid the issue.
0 commit comments