-
Notifications
You must be signed in to change notification settings - Fork 4
Update actions/checkout action to v5 #39
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
Changes from all commits
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 |
|---|---|---|
|
|
@@ -20,7 +20,7 @@ jobs: | |
| contents: write | ||
| steps: | ||
| - name: Checkout source branch | ||
| uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 | ||
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
|
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. You’re pinning - name: Checkout source branch
uses: actions/checkout@v5
with:
ref: ${{ env.SOURCE_BRANCH }}
path: source-folder |
||
| with: | ||
| ref: ${{ env.SOURCE_BRANCH }} | ||
| path: source-folder | ||
|
|
@@ -66,7 +66,7 @@ jobs: | |
| fi | ||
|
|
||
| - name: Checkout release branch | ||
| uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 | ||
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| with: | ||
| ref: ${{ env.RELEASE_BRANCH }} | ||
| path: release-folder | ||
|
|
@@ -102,7 +102,7 @@ jobs: | |
| pull-requests: write | ||
| steps: | ||
| - name: Checkout release branch | ||
| uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 | ||
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| with: | ||
| ref: ${{ env.RELEASE_BRANCH }} | ||
| - name: Run the AI-assisted action (PR Summary) | ||
|
Comment on lines
104
to
108
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. The "Checkout release branch" step is duplicated across multiple jobs. To adhere to DRY principles, consider extracting this into a reusable workflow or a YAML anchor. Example with an anchor: # Define an anchor at the top
x-checkout-release: &checkout-release
uses: actions/checkout@v5
with:
ref: ${{ env.RELEASE_BRANCH }}
# Then reuse it
jobs:
prepare:
steps:
- name: Checkout release branch
<<: *checkout-releaseThis consolidates the configuration and makes future adjustments easier. |
||
|
|
@@ -123,7 +123,7 @@ jobs: | |
| pull-requests: write | ||
| steps: | ||
| - name: Checkout release branch | ||
| uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 | ||
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| with: | ||
| ref: ${{ env.RELEASE_BRANCH }} | ||
| - name: Run the AI-assisted action (PR Review) | ||
|
|
@@ -143,7 +143,7 @@ jobs: | |
| contents: write | ||
| steps: | ||
| - name: Checkout release branch | ||
| uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 | ||
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| with: | ||
| ref: ${{ env.RELEASE_BRANCH }} | ||
| - name: Create tags for new version | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,7 +20,7 @@ jobs: | |
| path: [pr-summary, pr-review] | ||
| steps: | ||
| - name: Checkout source branch | ||
| uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 | ||
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
|
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. Similar to the uses: actions/checkout@v5There 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. Similar to the build workflow, you can replace the full SHA of - name: Checkout source branch
uses: actions/checkout@v5 |
||
| - name: Setup Node | ||
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | ||
| with: | ||
|
Comment on lines
25
to
26
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. The - name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: '18' |
||
|
|
@@ -45,7 +45,7 @@ jobs: | |
| path: [pr-summary, pr-review] | ||
| steps: | ||
| - name: Checkout source branch | ||
| uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 | ||
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| - name: Setup Node | ||
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | ||
| 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.
You’re currently pinning actions/checkout to a commit SHA. While this is secure, it can reduce readability and requires manual updates for minor or patch releases. Consider using the official semantic version tag so you automatically pick up backwards-compatible improvements: