-
Notifications
You must be signed in to change notification settings - Fork 1.2k
ci: enhance guix-build workflow to run on label and tags by default #6951
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?
Conversation
✅ No Merge Conflicts DetectedThis PR currently has no conflicts with other open PRs. |
WalkthroughThis pull request modifies the GitHub Actions workflow file to enable pull request-triggered builds with conditional execution logic. The workflow now responds to pull requests with a specific label and adds fallback logic for determining the correct git reference during checkout. The build jobs are configured to run under specific conditions: when pushing to tags, when a specific environment variable is set, or when a pull request contains the designated label. Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (1).github/**📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🧠 Learnings (3)📚 Learning: 2025-02-19T00:03:39.002ZApplied to files:
📚 Learning: 2025-02-19T00:03:39.001ZApplied to files:
📚 Learning: 2025-02-13T07:36:17.572ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
🔇 Additional comments (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.event.pull_request.head.sha }} | ||
| ref: ${{ github.event.pull_request.head.sha != '' && github.event.pull_request.head.sha || github.sha }} |
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.
@coderabbitai isn't github.event.pull_request.head.sha != '' && github.event.pull_request.head.sha the same as simply github.event.pull_request.head.sha?
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.
@UdjinM6 You're absolutely right! The explicit empty string check is redundant in this context.
Both expressions would produce the same result:
- Current:
github.event.pull_request.head.sha != '' && github.event.pull_request.head.sha || github.sha - Simpler:
github.event.pull_request.head.sha || github.sha
This is because in GitHub Actions expressions:
- Empty strings,
null, andundefinedare all falsy values - The
||operator will fall back togithub.shafor any falsy value on the left side - When
github.event.pull_request.head.shacontains an actual SHA (non-empty string), it's truthy and will be used - When the event is not a pull request or the value is empty/null, it's falsy and
github.shawill be used
The simpler form ${{ github.event.pull_request.head.sha || github.sha }} would be clearer and achieve the same result.
🧠 Learnings used
Learnt from: PastaPastaPasta
Repo: dashpay/dash PR: 6588
File: .github/workflows/release_docker_hub.yml:79-81
Timestamp: 2025-02-19T00:03:39.002Z
Learning: GitHub Actions supports ARM64 runners with the labels `ubuntu-latest-arm64` and `linux-arm64` for public repositories, introduced in January 2025. These runners are specifically designed for ARM64 architecture builds.
Learnt from: PastaPastaPasta
Repo: dashpay/dash PR: 6588
File: .github/workflows/release_docker_hub.yml:79-81
Timestamp: 2025-02-19T00:03:39.001Z
Learning: GitHub Actions supports ARM64 runners with the label `ubuntu-22.04-arm` for public repositories, introduced in January 2025. This runner is specifically designed for ARM64 architecture builds.
Issue being fixed or feature implemented
See commits; not explicitly tested, but workflow is currently disabled.
What was done?
How Has This Been Tested?
Breaking Changes
None
Checklist:
Go over all the following points, and put an
xin all the boxes that apply.