-
Notifications
You must be signed in to change notification settings - Fork 39
chore: Force run of docker-scan #504
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: main
Are you sure you want to change the base?
chore: Force run of docker-scan #504
Conversation
WalkthroughThe GitHub Actions workflow updates modify the docker-scan job’s conditional to include always() and an explicit check for needs.ci.result == 'success', ensuring docker-scan evaluates only after CI completes and runs only when CI succeeds, the PR is not a draft, and relevant docker files changed. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Dev as Developer
participant GH as GitHub Actions
participant CI as Job: ci
participant DS as Job: docker-scan
Dev->>GH: Open/Update PR
GH->>CI: Run CI job
CI-->>GH: Result (success/failure)
Note over GH: Evaluate docker-scan condition<br/>always() && needs.ci.result == 'success'<br/>&& !draft && docker-files changed
alt CI success AND conditions met
GH->>DS: Start docker-scan
DS-->>GH: docker-scan result
else Otherwise
GH-->>DS: Skip docker-scan
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
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 |
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: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/ci.yaml(1 hunks)
⏰ 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). (5)
- GitHub Check: boostsecurity - boostsecurityio/semgrep-pro
- GitHub Check: Analyze (rust)
- GitHub Check: Redirect rules - openzeppelin-relayer
- GitHub Check: Header rules - openzeppelin-relayer
- GitHub Check: Pages changed - openzeppelin-relayer
| - ci | ||
| if: | | ||
| ${{ github.event.pull_request.draft == false && needs.changed_files.outputs.changed-docker-files == 'true' }} | ||
| ${{ always() && github.event.pull_request.draft == false && needs.changed_files.outputs.changed-docker-files == 'true' && needs.ci.result == 'success' }} |
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.
Condition still blocks docker-scan when ci is skipped
The new guard still requires needs.ci.result == 'success'. When ci is skipped (the scenario called out in the PR description), its result is 'skipped', so this expression evaluates to false and the job is skipped again. The added always() never gets to help. To actually force the scan when ci doesn’t run, allow 'skipped' as an acceptable result (e.g. in(['success','skipped'], needs.ci.result)) or drop the equality altogether.
🤖 Prompt for AI Agents
.github/workflows/ci.yaml around line 291: the job’s if condition still requires
needs.ci.result == 'success', so when the CI job is skipped the expression is
false and docker-scan is skipped; update the condition to allow a skipped CI by
replacing that equality with a membership check (e.g. in(['success','skipped'],
needs.ci.result)) or remove the needs.ci.result check entirely so docker-scan
runs when changed-docker-files is true and the other guards pass.
|
@LuisUrrutia actually I'm thinking about moving |
Summary
Force run of docker scan, since there is a known bug of
ifconditions not working when previous steps (ciin this case) are skipped.Testing Process
We need to test it by merging it.
Checklist
Summary by CodeRabbit