Skip to content
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: fix build-docker job to still run when secrets not set/available #255

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

ErikBjare
Copy link
Owner

@ErikBjare ErikBjare commented Nov 14, 2024

Important

Adds conditional logic to build-docker job in build.yml to control Docker image pushing based on branch or tag.

  • Behavior:
    • Adds SHOULD_PUSH environment variable to build-docker job in build.yml to determine if Docker images should be pushed.
    • Conditional execution of Docker login and push steps based on SHOULD_PUSH value.
  • Workflow:
    • Modifies Log in to GitHub Container Registry and Push Docker image (base) steps to run only if SHOULD_PUSH is true.
    • Updates push parameter in Build and push Docker image (eval) step to use SHOULD_PUSH.

This description was created by Ellipsis for 170e4e4. It will automatically update as commits are pushed.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Reviewed everything up to 170e4e4 in 41 seconds

More details
  • Looked at 60 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. .github/workflows/build.yml:91
  • Draft comment:
    The if condition should use ${{ }} for expressions. Use if: ${{ env.SHOULD_PUSH == 'true' }} instead.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    The current syntax if: env.SHOULD_PUSH == 'true' is valid in GitHub Actions. The suggestion to use ${{ }} is not necessary as the current syntax works correctly. The comment does not point out a required change, as both syntaxes are acceptable.
    I might be missing some specific context where using ${{ }} is preferred or required, but generally, both syntaxes are valid. The comment does not provide strong evidence that a change is needed.
    Even if there is a preference for using ${{ }}, the current syntax is not incorrect, and the comment does not indicate a necessary change. The comment is more of a suggestion than a requirement.
    The comment should be deleted as it does not indicate a necessary change. The current syntax is valid and functional.
2. .github/workflows/build.yml:135
  • Draft comment:
    The push parameter should use ${{ }} for expressions. Use push: ${{ env.SHOULD_PUSH == 'true' }} instead. This issue is also present in the push parameter on line 112.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    The comment suggests a change to the syntax used for the push parameter. The current syntax push: ${{ env.SHOULD_PUSH }} is already using ${{ }} for the expression, which is correct. The suggestion to use push: ${{ env.SHOULD_PUSH == 'true' }} is unnecessary because env.SHOULD_PUSH is already a boolean expression. The comment about line 112 is irrelevant because it uses a static value false, not an expression.
    I might be missing some context about why the comment suggests using == 'true'. However, the current usage seems correct and the suggestion seems redundant.
    The current usage of push: ${{ env.SHOULD_PUSH }} is a standard way to handle boolean expressions in GitHub Actions, and the suggestion to add == 'true' is not necessary.
    The comment is not useful because the current syntax is correct and the suggestion is redundant. The comment should be deleted.

Workflow ID: wflow_eEVnqwfHCDlRzhTn


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@codecov-commenter
Copy link

codecov-commenter commented Nov 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.58%. Comparing base (66c977c) to head (170e4e4).

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #255   +/-   ##
=======================================
  Coverage   71.58%   71.58%           
=======================================
  Files          61       61           
  Lines        3952     3952           
=======================================
  Hits         2829     2829           
  Misses       1123     1123           
Flag Coverage Δ
anthropic/claude-3-haiku-20240307 70.62% <ø> (ø)
openai/gpt-4o-mini 70.52% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ErikBjare ErikBjare merged commit 3571a5a into master Nov 14, 2024
7 checks passed
@ErikBjare ErikBjare deleted the dev/fix-ci-permissions branch November 14, 2024 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants