-
Notifications
You must be signed in to change notification settings - Fork 624
update GitHub actions in CI workflow #1721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
2cbf223
f641ea2
a111052
6da8d81
6dcf8d4
5ef72b4
926390d
0af4b61
45ecd14
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -37,7 +37,7 @@ jobs: | |||||||||||||
with: | ||||||||||||||
go-version: 1.21.x | ||||||||||||||
- name: Checkout code | ||||||||||||||
uses: actions/checkout@v4 | ||||||||||||||
uses: actions/checkout@v5 | ||||||||||||||
- name: Cache cargo | ||||||||||||||
Comment on lines
+40
to
41
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Upgrade to actions/checkout@v5 looks good; consider pinning to a commit SHA. This job doesn’t fetch/push; you can safely disable credential persistence if desired. -uses: actions/checkout@v5
+uses: actions/checkout@<COMMIT-SHA> # v5.0.0
+with:
+ persist-credentials: false 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||||
uses: Swatinem/rust-cache@v2 | ||||||||||||||
with: | ||||||||||||||
|
@@ -56,7 +56,7 @@ jobs: | |||||||||||||
with: | ||||||||||||||
go-version: 1.21.x | ||||||||||||||
- name: Checkout code | ||||||||||||||
uses: actions/checkout@v4 | ||||||||||||||
uses: actions/checkout@v5 | ||||||||||||||
- name: Install goimports | ||||||||||||||
run: go install golang.org/x/tools/cmd/goimports | ||||||||||||||
- name: Run goimports lint | ||||||||||||||
|
@@ -81,7 +81,7 @@ jobs: | |||||||||||||
with: | ||||||||||||||
go-version: 1.21.x | ||||||||||||||
- name: Checkout code | ||||||||||||||
uses: actions/checkout@v4 | ||||||||||||||
uses: actions/checkout@v5 | ||||||||||||||
- name: Install Solc | ||||||||||||||
uses: supplypike/setup-bin@v3 | ||||||||||||||
with: | ||||||||||||||
|
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -34,7 +34,7 @@ jobs: | |||||||||||||
with: | ||||||||||||||
go-version: 1.21.x | ||||||||||||||
- name: Checkout code | ||||||||||||||
uses: actions/checkout@v4 | ||||||||||||||
uses: actions/checkout@v5 | ||||||||||||||
- name: Lint | ||||||||||||||
Comment on lines
+37
to
38
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Upgrade to actions/checkout@v5 looks good; consider pinning to a commit SHA. This job runs only local linting; disabling credential persistence is safe. -uses: actions/checkout@v5
+uses: actions/checkout@<COMMIT-SHA> # v5.0.0
+with:
+ persist-credentials: false 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||||
working-directory: 'database' | ||||||||||||||
run: | | ||||||||||||||
|
@@ -49,7 +49,7 @@ jobs: | |||||||||||||
with: | ||||||||||||||
go-version: 1.21.x | ||||||||||||||
- name: Checkout code | ||||||||||||||
uses: actions/checkout@v4 | ||||||||||||||
uses: actions/checkout@v5 | ||||||||||||||
- name: Install goimports | ||||||||||||||
run: go install golang.org/x/tools/cmd/goimports | ||||||||||||||
- name: Run goimports lint | ||||||||||||||
|
@@ -74,7 +74,7 @@ jobs: | |||||||||||||
with: | ||||||||||||||
go-version: 1.21.x | ||||||||||||||
- name: Checkout code | ||||||||||||||
uses: actions/checkout@v4 | ||||||||||||||
uses: actions/checkout@v5 | ||||||||||||||
- name: Install Solc | ||||||||||||||
uses: supplypike/setup-bin@v3 | ||||||||||||||
with: | ||||||||||||||
|
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -14,7 +14,7 @@ jobs: | |||||||||
group: scroll-reth-runner-group | ||||||||||
steps: | ||||||||||
- name: Checkout code | ||||||||||
uses: actions/checkout@v4 | ||||||||||
uses: actions/checkout@v5 | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainUpgrade to actions/checkout@v5 looks good; consider pinning to a commit SHA and (optionally) disabling credential persistence.
To locate any remaining non-v5 usages and retrieve the recommended pin for v5.0.0, run: Apply this pattern after obtaining the SHA: -uses: actions/checkout@v5
+uses: actions/checkout@<COMMIT-SHA> # v5.0.0
+# with:
+# persist-credentials: false 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "Scanning for non-v5 checkout usages..."
rg -n -H $'uses:\\s*actions/checkout@v(1|2|3|4)\\b' || echo "No non-v5 usages found."
echo "Getting commit SHA for actions/checkout v5.0.0..."
gh api repos/actions/checkout/git/refs/tags/v5.0.0 --jq '.object.sha' Length of output: 434 Pin To further harden our supply chain:
Suggested patch: - uses: actions/checkout@v5
+ uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
+ with:
+ persist-credentials: false 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||||
- name: Set up QEMU | ||||||||||
uses: docker/setup-qemu-action@v2 | ||||||||||
- name: Set up Docker Buildx | ||||||||||
|
@@ -60,7 +60,7 @@ jobs: | |||||||||
group: scroll-reth-runner-group | ||||||||||
steps: | ||||||||||
- name: Checkout code | ||||||||||
uses: actions/checkout@v4 | ||||||||||
uses: actions/checkout@v5 | ||||||||||
- name: Set up QEMU | ||||||||||
uses: docker/setup-qemu-action@v2 | ||||||||||
- name: Set up Docker Buildx | ||||||||||
|
@@ -106,7 +106,7 @@ jobs: | |||||||||
group: scroll-reth-runner-group | ||||||||||
steps: | ||||||||||
- name: Checkout code | ||||||||||
uses: actions/checkout@v4 | ||||||||||
uses: actions/checkout@v5 | ||||||||||
- name: Set up QEMU | ||||||||||
uses: docker/setup-qemu-action@v2 | ||||||||||
- name: Set up Docker Buildx | ||||||||||
|
@@ -152,7 +152,7 @@ jobs: | |||||||||
group: scroll-reth-runner-group | ||||||||||
steps: | ||||||||||
- name: Checkout code | ||||||||||
uses: actions/checkout@v4 | ||||||||||
uses: actions/checkout@v5 | ||||||||||
- name: Set up QEMU | ||||||||||
uses: docker/setup-qemu-action@v2 | ||||||||||
- name: Set up Docker Buildx | ||||||||||
|
@@ -198,7 +198,7 @@ jobs: | |||||||||
group: scroll-reth-runner-group | ||||||||||
steps: | ||||||||||
- name: Checkout code | ||||||||||
uses: actions/checkout@v4 | ||||||||||
uses: actions/checkout@v5 | ||||||||||
- name: Set up QEMU | ||||||||||
uses: docker/setup-qemu-action@v2 | ||||||||||
- name: Set up Docker Buildx | ||||||||||
|
@@ -244,7 +244,7 @@ jobs: | |||||||||
group: scroll-reth-runner-group | ||||||||||
steps: | ||||||||||
- name: Checkout code | ||||||||||
uses: actions/checkout@v4 | ||||||||||
uses: actions/checkout@v5 | ||||||||||
- name: Set up QEMU | ||||||||||
uses: docker/setup-qemu-action@v2 | ||||||||||
- name: Set up Docker Buildx | ||||||||||
|
@@ -290,7 +290,7 @@ jobs: | |||||||||
group: scroll-reth-runner-group | ||||||||||
steps: | ||||||||||
- name: Checkout code | ||||||||||
uses: actions/checkout@v4 | ||||||||||
uses: actions/checkout@v5 | ||||||||||
- name: Set up QEMU | ||||||||||
uses: docker/setup-qemu-action@v2 | ||||||||||
- name: Set up Docker Buildx | ||||||||||
|
@@ -336,7 +336,7 @@ jobs: | |||||||||
group: scroll-reth-runner-group | ||||||||||
steps: | ||||||||||
- name: Checkout code | ||||||||||
uses: actions/checkout@v4 | ||||||||||
uses: actions/checkout@v5 | ||||||||||
- name: Set up QEMU | ||||||||||
uses: docker/setup-qemu-action@v2 | ||||||||||
- name: Set up Docker Buildx | ||||||||||
|
@@ -381,7 +381,7 @@ jobs: | |||||||||
group: scroll-reth-runner-group | ||||||||||
steps: | ||||||||||
- name: Checkout code | ||||||||||
uses: actions/checkout@v4 | ||||||||||
uses: actions/checkout@v5 | ||||||||||
- name: Set up QEMU | ||||||||||
uses: docker/setup-qemu-action@v2 | ||||||||||
- name: Set up Docker Buildx | ||||||||||
|
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -24,7 +24,7 @@ jobs: | |||||||||
with: | ||||||||||
go-version: 1.21.x | ||||||||||
- name: Checkout code | ||||||||||
uses: actions/checkout@v4 | ||||||||||
uses: actions/checkout@v5 | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainHarden checkout usage: pin version and disable credential persistence To reduce supply-chain risk and avoid persisting tokens in the repo’s .git config during PRs, consider pinning to a fixed version and turning off credential persistence (since no git push happens in this job). Apply this pattern here (and replicate across workflows): - uses: actions/checkout@v5
+ uses: actions/[email protected]
+ with:
+ persist-credentials: false Run this to confirm all checkouts are migrated and find any remaining v2/v3/v4 (and optionally quantify how many are pinned vs floating majors): 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "All checkout versions found:"
rg -n --no-heading $'uses:\\s*actions/checkout@' -g '.github/workflows/*.yml' || true
echo -e "\nNon-v5 checkout occurrences (should be zero):"
rg -n --no-heading $'uses:\\s*actions/checkout@(v(2|3|4)\\b|main|master)' -g '.github/workflows/*.yml' || true
echo -e "\nUnpinned v5 (floating majors):"
rg -n --no-heading $'uses:\\s*actions/checkout@v5\\b' -g '.github/workflows/*.yml' || true
echo -e "\nPinned to specific v5.x or commit SHA:"
rg -n --no-heading -e $'uses:\\s*actions/checkout@v5\\.[0-9]+' -e $'uses:\\s*actions/checkout@[0-9a-fA-F]{40}' -g '.github/workflows/*.yml' || true Length of output: 1386 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "Workflow files in .github/workflows:"
find .github/workflows -maxdepth 1 -type f -print || true
echo -e "\nOccurrences of actions/checkout in all workflow files:"
rg -Hn 'uses:\s*actions/checkout@' -g '.github/workflows/*' || true Length of output: 852 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "Scanning for actions/checkout usage in workflow YAMLs:"
find .github/workflows -type f -name '*.yml' -print0 \
| xargs -0 grep -Hn 'uses:\s*actions/checkout@' Length of output: 2306 Pin checkout action to a fixed v5 minor and disable credential persistence across all workflows We found one - uses: actions/checkout@v5
+ uses: actions/[email protected]
+ with:
+ persist-credentials: false Affected locations:
📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||||
- name: Install Solc | ||||||||||
uses: supplypike/setup-bin@v3 | ||||||||||
with: | ||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
❓ Verification inconclusive
Upgrade to actions/checkout@v5 is fine; consider pinning to a commit SHA.
This job performs git fetch and auto-commit/push, so keep persist-credentials: true (default). Only add pinning.
Apply this pattern after you retrieve the v5.0.0 commit SHA:
Also ensure your runners (especially self-hosted, if any) are updated to a version that supports Node 20-based actions, which checkout v5 requires.
Pin checkout action to an immutable commit SHA
To guard against unexpected changes downstream, it’s best to pin
actions/checkout
v5 to its specific commit SHA while retaining the defaultpersist-credentials: true
for your auto-commit/push step:• File:
.github/workflows/bump_version.yml
(around lines 19–22)• Replace:
• No changes needed for
persist-credentials
(defaults totrue
).Additionally, verify that all runners (especially any self-hosted ones) are on Node 20 or later, as checkout v5 requires Node.js 20+ support.
🤖 Prompt for AI Agents