-
Notifications
You must be signed in to change notification settings - Fork 1
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
ci(web): fix tag name #101
Conversation
WalkthroughThe changes in the pull request focus on modifying the workflow configuration in Changes
Possibly related PRs
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (2)
.github/workflows/web_build.yml (2)
Line range hint
99-104
: Critical: Invalid output reference in docker build stepThe build step is trying to use
steps.options.outputs.new_tag_short
which doesn't exist. The options step only setsplatforms
,version
, andtags
outputs.Apply this fix:
with: context: ./web platforms: ${{ steps.options.outputs.platforms }} push: true - tags: ${{ steps.options.outputs.new_tag_short }} + tags: ${{ steps.options.outputs.tags }} cache-from: type=gha cache-to: type=gha,mode=max🧰 Tools
🪛 actionlint (1.7.3)
79-79: 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)
79-79: 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)
79-79: 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)
Line range hint
28-35
: Consider adding explicit tag format validationTo prevent issues with malformed tags, consider adding explicit validation of the tag format before processing. This could help catch issues early in the workflow.
Example validation to add in the info job:
if [[ "$BRANCH" = "release" ]]; then TAG=$(git tag --points-at HEAD) if [[ ! -z "$TAG" ]]; then + # Validate tag format + if [[ ! $TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9]+)?$ ]]; then + echo "::error::Invalid tag format: $TAG" + exit 1 + fi echo "::set-output name=new_tag::$TAG" echo "::set-output name=new_tag_short::${TAG#v}"🧰 Tools
🪛 actionlint (1.7.3)
79-79: 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)
79-79: 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)
79-79: 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)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
.github/workflows/web_build.yml
(1 hunks)
🔇 Additional comments (2)
.github/workflows/web_build.yml (2)
76-76
: LGTM: Tag variable now correctly references the output
The environment variable TAG
now properly references new_tag_short
from the info job's outputs, which aligns with the declared output variables.
Line range hint 76-93
: Verify tag handling logic across different scenarios
The tag handling logic looks correct but should be verified across different scenarios:
- Release tags (e.g., v1.2.3)
- Pre-release tags (with hyphens)
- Non-release builds (nightly/rc)
✅ Verification successful
Tag handling logic works correctly across all scenarios
The verification confirms that the tag handling implementation is robust:
- Release tags (v*..)
new_tag_short
correctly strips the 'v' prefix using${TAG#v}
- Generates additional tags for major, minor, and latest versions
- Pre-release tags (with hyphens)
- Correctly handled by skipping additional tag generation
- Non-release builds (nightly/rc)
- Falls back to SHA-based versioning as expected
- Only builds for amd64 platform
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify tag handling logic by checking recent tags and their formats
# Check recent tags to understand the tag format
git fetch --tags
echo "Recent tags:"
git tag --sort=-creatordate | head -n 5
# Check if there are any tags that don't follow the expected format
echo -e "\nTags not following v*.*.* format:"
git tag | grep -v "^v[0-9]\+\.[0-9]\+\.[0-9]\+"
Length of output: 617
Script:
#!/bin/bash
# Let's verify the info job's tag handling logic to see how it processes these tags
# Check the info job implementation
echo "Info job implementation:"
rg -A 10 "id: info" .github/workflows/
# Check how new_tag_short is set
echo -e "\nTag processing logic:"
rg "new_tag_short" .github/workflows/
Length of output: 2896
🧰 Tools
🪛 actionlint (1.7.3)
79-79: 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)
79-79: 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)
79-79: 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)
What I've done
The variable name of ouput to be specified as tag was incorrect and has been corrected.
What I haven't done
How I tested
Which point I want you to review particularly
Notes
Summary by CodeRabbit