Skip to content

Commit 1044a6d

Browse files
aiqiaoyCopilot
andauthored
getting ready for checkout v7 release (#2464)
* getting ready for checkout v7 release * update changelog wording Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent f028218 commit 1044a6d

5 files changed

Lines changed: 76 additions & 50 deletions

File tree

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
## v7.0.0
4+
* Block checking out fork PR for pull_request_target and workflow_run by @aiqiaoy in https://github.com/actions/checkout/pull/2454
5+
* Bump actions/publish-immutable-action from 0.0.3 to 0.0.4 in the minor-actions-dependencies group across 1 directory by @dependabot[bot] in https://github.com/actions/checkout/pull/2458
6+
* Bump flatted from 3.3.1 to 3.4.2 by @dependabot[bot] in https://github.com/actions/checkout/pull/2460
7+
* Bump js-yaml from 4.1.0 to 4.2.0 by @dependabot[bot] in https://github.com/actions/checkout/pull/2461
8+
* Bump @actions/core and @actions/tool-cache and Remove uuid by @dependabot[bot] in https://github.com/actions/checkout/pull/2459
9+
* upgrade module to esm and update dependencies by @aiqiaoy in https://github.com/actions/checkout/pull/2463
10+
* Bump the minor-npm-dependencies group across 1 directory with 3 updates by @dependabot[bot] in https://github.com/actions/checkout/pull/2462
11+
312
## v6.0.3
413
* Fix checkout init for SHA-256 repositories by @yaananth in https://github.com/actions/checkout/pull/2439
514
* fix: expand merge commit SHA regex and add SHA-256 test cases by @yaananth in https://github.com/actions/checkout/pull/2414

README.md

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
[![Build and Test](https://github.com/actions/checkout/actions/workflows/test.yml/badge.svg)](https://github.com/actions/checkout/actions/workflows/test.yml)
22

3+
# Checkout v7
4+
5+
## What's new
6+
7+
- Safer fork pull request handling: checkout now refuses to check out fork pull request code by default when the workflow is triggered by `pull_request_target` or `workflow_run`. These triggers run with the base repository's `GITHUB_TOKEN`, secrets, and runner access, where executing a fork's code commonly leads to "pwn request" vulnerabilities.
8+
- To opt in after [reviewing the risks](https://gh.io/securely-using-pull_request_target), set the new `allow-unsafe-pr-checkout: true` input.
9+
- Migrated `actions/checkout` to ESM to support new versions of the `@actions/*` packages.
10+
- Updated direct and transitive dependencies, including security fixes for known vulnerabilities.
11+
312
# Checkout v6
413

514
## What's new
@@ -15,7 +24,6 @@
1524
- Updated to the node24 runtime
1625
- This requires a minimum Actions Runner version of [v2.327.1](https://github.com/actions/runner/releases/tag/v2.327.1) to run.
1726

18-
1927
# Checkout v4
2028

2129
This action checks-out your repository under `$GITHUB_WORKSPACE`, so your workflow can access it.
@@ -52,7 +60,7 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/
5260

5361
<!-- start usage -->
5462
```yaml
55-
- uses: actions/checkout@v6
63+
- uses: actions/checkout@v7
5664
with:
5765
# Repository name with owner. For example, actions/checkout
5866
# Default: ${{ github.repository }}
@@ -200,15 +208,15 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/
200208
## Fetch only the root files
201209

202210
```yaml
203-
- uses: actions/checkout@v6
211+
- uses: actions/checkout@v7
204212
with:
205213
sparse-checkout: .
206214
```
207215

208216
## Fetch only the root files and `.github` and `src` folder
209217

210218
```yaml
211-
- uses: actions/checkout@v6
219+
- uses: actions/checkout@v7
212220
with:
213221
sparse-checkout: |
214222
.github
@@ -218,7 +226,7 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/
218226
## Fetch only a single file
219227

220228
```yaml
221-
- uses: actions/checkout@v6
229+
- uses: actions/checkout@v7
222230
with:
223231
sparse-checkout: |
224232
README.md
@@ -228,23 +236,23 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/
228236
## Fetch all history for all tags and branches
229237

230238
```yaml
231-
- uses: actions/checkout@v6
239+
- uses: actions/checkout@v7
232240
with:
233241
fetch-depth: 0
234242
```
235243

236244
## Checkout a different branch
237245

238246
```yaml
239-
- uses: actions/checkout@v6
247+
- uses: actions/checkout@v7
240248
with:
241249
ref: my-branch
242250
```
243251

244252
## Checkout HEAD^
245253

246254
```yaml
247-
- uses: actions/checkout@v6
255+
- uses: actions/checkout@v7
248256
with:
249257
fetch-depth: 2
250258
- run: git checkout HEAD^
@@ -254,12 +262,12 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/
254262

255263
```yaml
256264
- name: Checkout
257-
uses: actions/checkout@v6
265+
uses: actions/checkout@v7
258266
with:
259267
path: main
260268
261269
- name: Checkout tools repo
262-
uses: actions/checkout@v6
270+
uses: actions/checkout@v7
263271
with:
264272
repository: my-org/my-tools
265273
path: my-tools
@@ -270,10 +278,10 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/
270278

271279
```yaml
272280
- name: Checkout
273-
uses: actions/checkout@v6
281+
uses: actions/checkout@v7
274282
275283
- name: Checkout tools repo
276-
uses: actions/checkout@v6
284+
uses: actions/checkout@v7
277285
with:
278286
repository: my-org/my-tools
279287
path: my-tools
@@ -284,12 +292,12 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/
284292

285293
```yaml
286294
- name: Checkout
287-
uses: actions/checkout@v6
295+
uses: actions/checkout@v7
288296
with:
289297
path: main
290298
291299
- name: Checkout private tools
292-
uses: actions/checkout@v6
300+
uses: actions/checkout@v7
293301
with:
294302
repository: my-org/my-private-tools
295303
token: ${{ secrets.GH_PAT }} # `GH_PAT` is a secret that contains your PAT
@@ -302,7 +310,7 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/
302310
## Checkout pull request HEAD commit instead of merge commit
303311

304312
```yaml
305-
- uses: actions/checkout@v6
313+
- uses: actions/checkout@v7
306314
with:
307315
ref: ${{ github.event.pull_request.head.sha }}
308316
```
@@ -318,7 +326,7 @@ jobs:
318326
build:
319327
runs-on: ubuntu-latest
320328
steps:
321-
- uses: actions/checkout@v6
329+
- uses: actions/checkout@v7
322330
```
323331

324332
## Push a commit using the built-in token
@@ -329,7 +337,7 @@ jobs:
329337
build:
330338
runs-on: ubuntu-latest
331339
steps:
332-
- uses: actions/checkout@v6
340+
- uses: actions/checkout@v7
333341
- run: |
334342
date > generated.txt
335343
# Note: the following account information will not work on GHES
@@ -351,7 +359,7 @@ jobs:
351359
build:
352360
runs-on: ubuntu-latest
353361
steps:
354-
- uses: actions/checkout@v6
362+
- uses: actions/checkout@v7
355363
with:
356364
ref: ${{ github.head_ref }}
357365
- run: |

package-lock.json

Lines changed: 39 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "checkout",
3-
"version": "5.0.0",
3+
"version": "7.0.0",
44
"description": "checkout action",
55
"type": "module",
66
"main": "lib/main.js",

src/misc/generate-docs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ function updateUsage(
123123
}
124124

125125
updateUsage(
126-
'actions/checkout@v6',
126+
'actions/checkout@v7',
127127
path.join(__dirname, '..', '..', 'action.yml'),
128128
path.join(__dirname, '..', '..', 'README.md')
129129
)

0 commit comments

Comments
 (0)