-
Notifications
You must be signed in to change notification settings - Fork 16
Enable getting agent config from secret #66
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
Conversation
WalkthroughThe pull request updates the GitHub Actions workflow file to add an optional input parameter Changes
Sequence Diagram(s)sequenceDiagram
participant Trigger as Workflow Trigger (User/Caller)
participant Workflow as GitHub Actions Workflow
participant Job as build-bootc-images Job
participant Config as AGENT_CONFIG value
Trigger->>Workflow: Start workflow with optional AGENT_CONFIG
Workflow->>Job: Set env AGENT_CONFIG = if (input != empty) ? input : secret
Job->>Job: Check if AGENT_CONFIG is not empty
alt AGENT_CONFIG provided
Job->>Job: Decode base64 value from AGENT_CONFIG
Job->>Job: Write decoded value to config.yaml
else
Job->>Job: Use fallback secret config
end
Possibly related PRs
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
🪧 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
🧹 Nitpick comments (2)
.github/workflows/build-bootc-image.yaml (2)
77-77: Expression String Literal FormatThe environment variable assignment for
AGENT_CONFIGuses a comparison with an empty string using double quotes. Actionlint expects string literals to be enclosed in single quotes. Consider replacing the double quotes with single quotes to avoid linting issues.- AGENT_CONFIG: ${{ (inputs.agent-config != "") && inputs.agent-config || secrets.AGENT_CONFIG }} + AGENT_CONFIG: ${{ (inputs.agent-config != '') && inputs.agent-config || secrets.AGENT_CONFIG }}🧰 Tools
🪛 actionlint (1.7.4)
77-77: got unexpected character '"' while lexing expression, expecting 'a'..'z', 'A'..'Z', '_', '0'..'9', ''', '}', '(', ')', '[', ']', '.', '!', '<', '>', '=', '&', '|', '*', ',', ' '. do you mean string literals? only single quotes are available for string delimiter
(expression)
103-104: Base64 Decoding of Agent ConfigurationThe build step correctly checks if
AGENT_CONFIGis non-empty and decodes it from base64 to generateconfig.yaml. To improve robustness, consider incorporating error handling or validation to ensure that the provided value is valid base64. This can prevent potential build failures when the input is malformed.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/build-bootc-image.yaml(3 hunks)
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/build-bootc-image.yaml
77-77: got unexpected character '"' while lexing expression, expecting 'a'..'z', 'A'..'Z', '_', '0'..'9', ''', '}', '(', ')', '[', ']', '.', '!', '<', '>', '=', '&', '|', '*', ',', ' '. do you mean string literals? only single quotes are available for string delimiter
(expression)
🔇 Additional comments (1)
.github/workflows/build-bootc-image.yaml (1)
59-60: Secret Integration for AGENT_CONFIGThe addition of the optional secret
AGENT_CONFIGin theworkflow_callsecrets section is clear and aligns with the PR objective of enabling agent configuration via secrets. This change allows for a fallback mechanism when no input is provided.
9e1a866 to
8f74478
Compare
Summary by CodeRabbit