-
Notifications
You must be signed in to change notification settings - Fork 153
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
fix(workflow): fix DCO check #3512
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 |
---|---|---|
|
@@ -37,6 +37,14 @@ jobs: | |
bash scripts/generate-longhorn-yaml.sh | ||
bash scripts/helm-docs.sh | ||
|
||
- name: Get Head Commit Name | ||
id: get_head_commit_name | ||
run: echo "::set-output name=commit_name::$(git log -1 --pretty=format:'%an')" | ||
|
||
- name: Get Head Commit Email | ||
id: get_head_commit_email | ||
run: echo "::set-output name=commit_email::$(git log -1 --pretty=format:'%ae')" | ||
|
||
- name: Create Pull Request | ||
id: cpr | ||
uses: peter-evans/create-pull-request@v7 | ||
|
@@ -46,9 +54,8 @@ jobs: | |
delete-branch: true | ||
sign-commits: true | ||
signoff: true | ||
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> | ||
committer: Longhorn GitHub Bot <[email protected]> | ||
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. Do we know why the bot account with sign is not valid for DCO check? 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. I have no idea for now. Although I set the committer and author to Longhorn bot, the longhorn/longhorn PR will be created by the author of the longhorn/longhorn-manager PR rather than the Longhorn bot when triggering the workflow by |
||
commit-message: "chore(crd): update crds.yaml and manifests" | ||
author: ${{ steps.get_head_commit_name.outputs.commit_name }} <${{ steps.get_head_commit_email.outputs.commit_email }}> | ||
committer: ${{ steps.get_head_commit_name.outputs.commit_name }} <${{ steps.get_head_commit_email.outputs.commit_email }}> | ||
title: "chore(crd): update crds.yaml and manifests (PR longhorn/longhorn-manager#${{ github.event.pull_request.number}})" | ||
body: | | ||
This PR updates the crds.yaml and manifests. | ||
|
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.
💡 Codebase verification
🛠️ Refactor suggestion
Deprecated
set-output
Usage Confirmed in WorkflowThe search result confirms that the workflow file still uses the deprecated
::set-output
command at the following lines:::set-output
for the commit name.::set-output
for the commit email.Please update these steps to use the
$GITHUB_OUTPUT
mechanism as detailed in the review comment to comply with the updated GitHub Actions guidelines.🔗 Analysis chain
Update Deprecated
set-output
CommandsThe steps "Get Head Commit Name" (line 42) and "Get Head Commit Email" (line 46) still use the deprecated
::set-output
command. To comply with the current GitHub Actions guidelines, update these commands to use the$GITHUB_OUTPUT
mechanism. For example, you could replace the current implementation with:and similarly for the commit email:
This change aligns with the updated GitHub Actions syntax and resolves warnings from static analysis tools.
🏁 Scripts executed
The following scripts were executed for the analysis:
Error: No shell scripts or web queries found
Script:
Length of output: 268
🧰 Tools
🪛 actionlint (1.7.4)
42-42: workflow command "set-output" was deprecated. use
echo "{name}={value}" >> $GITHUB_OUTPUT
instead: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions(deprecated-commands)
46-46: workflow command "set-output" was deprecated. use
echo "{name}={value}" >> $GITHUB_OUTPUT
instead: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions(deprecated-commands)