Skip to content

Commit

Permalink
docs: update to checkout v4
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-evans committed Oct 31, 2023
1 parent 2f09215 commit 76c6f5c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ Note that the repository must be checked out on a branch with a remote, it won't

```yml
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Create commits
run: |
git config user.name 'Peter Evans'
Expand Down Expand Up @@ -225,7 +225,7 @@ jobs:
createPullRequest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Make changes to pull request
run: date +%s > report.txt
Expand Down
18 changes: 9 additions & 9 deletions docs/concepts-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ For each [event type](https://docs.github.com/en/actions/reference/events-that-t
The default can be overridden by specifying a `ref` on checkout.

```yml
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: develop
```
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
example:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
```

There may be use cases where it makes sense to execute the workflow on a branch that is not the base of the pull request. In these cases, the base branch can be specified with the `base` action input. The action will attempt to rebase changes made during the workflow on to the actual base.
Expand Down Expand Up @@ -173,7 +173,7 @@ This action uses [ncc](https://github.com/vercel/ncc) to compile the Node.js cod
Checking out a branch from a different repository from where the workflow is executing will make *that repository* the target for the created pull request. In this case, a `repo` scoped [Personal Access Token (PAT)](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) is required.

```yml
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
token: ${{ secrets.PAT }}
repository: owner/repo
Expand All @@ -200,7 +200,7 @@ How to use SSH (deploy keys) with create-pull-request action:

```yml
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
Expand All @@ -226,7 +226,7 @@ Note that if you choose to use this method (not give the machine account `write`
6. As shown in the following example workflow, set the `push-to-fork` input to the full repository name of the fork.

```yaml
- uses: actions/checkout@v3
- uses: actions/checkout@v4
# Make changes to pull request here
Expand Down Expand Up @@ -264,7 +264,7 @@ GitHub App generated tokens are more secure than using a PAT because GitHub App

```yaml
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: tibdex/github-app-token@v1
id: generate-token
Expand Down Expand Up @@ -304,7 +304,7 @@ The action can use GPG to sign commits with a GPG key that you generate yourself
```yaml
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: crazy-max/ghaction-import-gpg@v5
with:
Expand Down Expand Up @@ -341,7 +341,7 @@ jobs:
- name: Install dependencies
run: apk --no-cache add git

- uses: actions/checkout@v3
- uses: actions/checkout@v4

# Make changes to pull request here

Expand All @@ -364,7 +364,7 @@ jobs:
add-apt-repository -y ppa:git-core/ppa
apt-get install -y git
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# Make changes to pull request here

Expand Down
26 changes: 13 additions & 13 deletions docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
updateAuthors:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Update AUTHORS
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
productionPromotion:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: production
- name: Reset promotion branch
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
updateChangelog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Update Changelog
Expand Down Expand Up @@ -145,7 +145,7 @@ jobs:
update-dep:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: '16.x'
Expand Down Expand Up @@ -181,7 +181,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 16.x
Expand All @@ -205,7 +205,7 @@ jobs:
update-dep:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v2
with:
distribution: 'temurin'
Expand Down Expand Up @@ -243,7 +243,7 @@ jobs:
update-dep:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Update dependencies
run: |
cargo install cargo-edit
Expand Down Expand Up @@ -278,7 +278,7 @@ jobs:
updateSwagger:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Get Latest Swagger UI Release
id: swagger-ui
run: |
Expand Down Expand Up @@ -343,7 +343,7 @@ jobs:
updateFork:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: fork-owner/repo
- name: Reset the default branch with upstream changes
Expand Down Expand Up @@ -371,7 +371,7 @@ jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Download website
run: |
wget \
Expand Down Expand Up @@ -467,7 +467,7 @@ jobs:
if: startsWith(github.head_ref, 'autopep8-patches') == false && github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: autopep8
Expand Down Expand Up @@ -516,13 +516,13 @@ jobs:
if: startsWith(github.ref, 'refs/heads/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
...
someOtherJob:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
...
```
Expand Down

0 comments on commit 76c6f5c

Please sign in to comment.