From 76c6f5c20e2111bfee3cd30fae52a25e410f5efc Mon Sep 17 00:00:00 2001 From: Peter Evans <18365890+peter-evans@users.noreply.github.com> Date: Tue, 31 Oct 2023 15:33:41 +0000 Subject: [PATCH] docs: update to checkout v4 --- README.md | 4 ++-- docs/concepts-guidelines.md | 18 +++++++++--------- docs/examples.md | 26 +++++++++++++------------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index dc6b360..8f362f6 100644 --- a/README.md +++ b/README.md @@ -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' @@ -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 diff --git a/docs/concepts-guidelines.md b/docs/concepts-guidelines.md index eb2ba06..d8409ee 100644 --- a/docs/concepts-guidelines.md +++ b/docs/concepts-guidelines.md @@ -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 ``` @@ -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. @@ -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 @@ -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 }} @@ -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 @@ -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 @@ -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: @@ -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 @@ -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 diff --git a/docs/examples.md b/docs/examples.md index 1713151..8d4593d 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -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 @@ -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 @@ -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 @@ -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' @@ -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 @@ -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' @@ -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 @@ -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: | @@ -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 @@ -371,7 +371,7 @@ jobs: format: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Download website run: | wget \ @@ -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 @@ -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 ... ```