From c4af243d45256f48ad327504169ed6c3d5fdb3de Mon Sep 17 00:00:00 2001 From: Kristjan SCHMIDT <35647502+KristjanESPERANTO@users.noreply.github.com> Date: Sat, 7 Oct 2023 16:34:35 +0200 Subject: [PATCH 1/5] Bump actions/checkout from 3 to 4 --- .../test/action/.github/workflows/actionlint_bad_1.yml | 2 +- .../test/action/.github/workflows/actionlint_good_1.yaml | 2 +- README.md | 2 +- TEMPLATES/mega-linter.yml | 2 +- docs/descriptors/repository_gitleaks.md | 2 +- docs/install-github.md | 2 +- .../generators/mega-linter/templates/mega-linter.yml | 2 +- mega-linter-runner/lib/upgrade.js | 8 ++++---- .../descriptors/repository.megalinter-descriptor.yml | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.automation/test/action/.github/workflows/actionlint_bad_1.yml b/.automation/test/action/.github/workflows/actionlint_bad_1.yml index d7c1a094ff0..2d7cb1f399d 100644 --- a/.automation/test/action/.github/workflows/actionlint_bad_1.yml +++ b/.automation/test/action/.github/workflows/actionlint_bad_1.yml @@ -11,7 +11,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - run: echo "Checking commit '${{ github.event.head_commit.message }}'" - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-node@v2 with: node_version: 16.x diff --git a/.automation/test/action/.github/workflows/actionlint_good_1.yaml b/.automation/test/action/.github/workflows/actionlint_good_1.yaml index f4a1e3c2266..d186f492402 100644 --- a/.automation/test/action/.github/workflows/actionlint_good_1.yaml +++ b/.automation/test/action/.github/workflows/actionlint_good_1.yaml @@ -17,7 +17,7 @@ jobs: env: COMMIT_MESSAGE: ${{ github.event.head_commit.message }} run: echo "Checking commit '$COMMIT_MESSAGE'" - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-node@v2 with: node-version: 16.x diff --git a/README.md b/README.md index ec9795622b9..a236c7ea2da 100644 --- a/README.md +++ b/README.md @@ -456,7 +456,7 @@ jobs: steps: # Git Checkout - name: Checkout Code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }} fetch-depth: 0 # If you use VALIDATE_ALL_CODEBASE = true, you can remove this line to improve performances diff --git a/TEMPLATES/mega-linter.yml b/TEMPLATES/mega-linter.yml index e69f4a0563e..65e4e5ba6f5 100644 --- a/TEMPLATES/mega-linter.yml +++ b/TEMPLATES/mega-linter.yml @@ -51,7 +51,7 @@ jobs: # Git Checkout - name: Checkout Code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }} diff --git a/docs/descriptors/repository_gitleaks.md b/docs/descriptors/repository_gitleaks.md index 94e8f009a30..e75c2bd62b2 100644 --- a/docs/descriptors/repository_gitleaks.md +++ b/docs/descriptors/repository_gitleaks.md @@ -24,7 +24,7 @@ To scan only PR commits, the [shallow fetch](https://git-scm.com/docs/git-fetch# #### GitHub Actions ```yml -- uses: actions/checkout@v3 +- uses: actions/checkout@v4 with: fetch-depth: 0 ``` diff --git a/docs/install-github.md b/docs/install-github.md index 1c225e2413a..eada43ee97e 100644 --- a/docs/install-github.md +++ b/docs/install-github.md @@ -61,7 +61,7 @@ jobs: steps: # Git Checkout - name: Checkout Code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }} fetch-depth: 0 # If you use VALIDATE_ALL_CODEBASE = true, you can remove this line to improve performances diff --git a/mega-linter-runner/generators/mega-linter/templates/mega-linter.yml b/mega-linter-runner/generators/mega-linter/templates/mega-linter.yml index 08e42f6d637..284481280e3 100644 --- a/mega-linter-runner/generators/mega-linter/templates/mega-linter.yml +++ b/mega-linter-runner/generators/mega-linter/templates/mega-linter.yml @@ -50,7 +50,7 @@ jobs: steps: # Git Checkout - name: Checkout Code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }} diff --git a/mega-linter-runner/lib/upgrade.js b/mega-linter-runner/lib/upgrade.js index 395a9157a93..81061a79559 100644 --- a/mega-linter-runner/lib/upgrade.js +++ b/mega-linter-runner/lib/upgrade.js @@ -226,10 +226,10 @@ jobs: // V5 to V6 migration rules // GitHub actions { - regex: /actions\/checkout@v2/gm, - replacement: "actions/checkout@v3", - test: "uses: actions/checkout@v2", - testRes: "uses: actions/checkout@v3", + regex: /actions\/checkout@v3/gm, + replacement: "actions/checkout@v4", + test: "uses: actions/checkout@v3", + testRes: "uses: actions/checkout@v4", }, // Documentation base URL { diff --git a/megalinter/descriptors/repository.megalinter-descriptor.yml b/megalinter/descriptors/repository.megalinter-descriptor.yml index aee10fd317c..d96e10ae40a 100644 --- a/megalinter/descriptors/repository.megalinter-descriptor.yml +++ b/megalinter/descriptors/repository.megalinter-descriptor.yml @@ -192,7 +192,7 @@ linters: #### GitHub Actions ```yml - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 ``` From aac3d72ef4330519675b9ea7c914ea89f00e3549 Mon Sep 17 00:00:00 2001 From: Kristjan SCHMIDT <35647502+KristjanESPERANTO@users.noreply.github.com> Date: Sat, 7 Oct 2023 16:36:19 +0200 Subject: [PATCH 2/5] Bump actions/checkout from 3 to 4 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2238225fbc3..fb0f0addb1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-l - Display list of articles from newest to oldest - CI + - Bump actions/checkout from 3 to 4 - Linter versions upgrades - [cfn-lint](https://github.com/aws-cloudformation/cfn-lint) from 0.80.2 to **0.80.3** on 2023-09-24 From 1f358a93ed2c6611b5a851a7a5b3838c7da0a038 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Mon, 10 Jun 2024 19:45:23 -0400 Subject: [PATCH 3/5] Update upgrade.js --- mega-linter-runner/lib/upgrade.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mega-linter-runner/lib/upgrade.js b/mega-linter-runner/lib/upgrade.js index 81061a79559..af5784c53d4 100644 --- a/mega-linter-runner/lib/upgrade.js +++ b/mega-linter-runner/lib/upgrade.js @@ -226,10 +226,17 @@ jobs: // V5 to V6 migration rules // GitHub actions { + regex: /actions\/checkout@v2/gm, + replacement: "actions/checkout@v3", + test: "uses: actions/checkout@v2", + testRes: "uses: actions/checkout@v3", + }, + { regex: /actions\/checkout@v3/gm, replacement: "actions/checkout@v4", test: "uses: actions/checkout@v3", testRes: "uses: actions/checkout@v4", + }, }, // Documentation base URL { From f34cbd6cfb55526788236550902e8441bccf7717 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Mon, 10 Jun 2024 19:48:52 -0400 Subject: [PATCH 4/5] Update upgrade.js --- mega-linter-runner/lib/upgrade.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mega-linter-runner/lib/upgrade.js b/mega-linter-runner/lib/upgrade.js index af5784c53d4..2265c8f4ebe 100644 --- a/mega-linter-runner/lib/upgrade.js +++ b/mega-linter-runner/lib/upgrade.js @@ -230,13 +230,13 @@ jobs: replacement: "actions/checkout@v3", test: "uses: actions/checkout@v2", testRes: "uses: actions/checkout@v3", - }, - { + }, + { regex: /actions\/checkout@v3/gm, replacement: "actions/checkout@v4", test: "uses: actions/checkout@v3", testRes: "uses: actions/checkout@v4", - }, + }, }, // Documentation base URL { From e56c8cb0f992cc2855ff33d5567c07d60a244111 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Mon, 10 Jun 2024 19:52:06 -0400 Subject: [PATCH 5/5] Update upgrade.js --- mega-linter-runner/lib/upgrade.js | 1 - 1 file changed, 1 deletion(-) diff --git a/mega-linter-runner/lib/upgrade.js b/mega-linter-runner/lib/upgrade.js index 2265c8f4ebe..bb23ef94807 100644 --- a/mega-linter-runner/lib/upgrade.js +++ b/mega-linter-runner/lib/upgrade.js @@ -237,7 +237,6 @@ jobs: test: "uses: actions/checkout@v3", testRes: "uses: actions/checkout@v4", }, - }, // Documentation base URL { regex: /https:\/\/megalinter\.github\.io/gm,