Integrate Rabbit lifecycle resolution#2
Open
fqjony wants to merge 3 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR delegates lifecycle resolution to the external udx/rabbit-lifecycle action while keeping this action responsible for config discovery and deep-merge behavior. It also adds a small smoke test script and updates docs to reflect the new lifecycle flow and source_dir layout guidance.
Changes:
- Add a new “Resolve Rabbit lifecycle” step (via
udx/rabbit-lifecycle) and surface additional lifecycle metadata outputs (is_protected,resolution_reason). - Tighten config discovery to only consider directories under configured lifecycle roots, including supporting nested
source_dirlayouts (e.g..rabbit/infra_configs). - Add bash-based smoke coverage for lifecycle base + env override merge behavior and update README documentation.
Reviewed changes
Copilot reviewed 5 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
action.yml |
Adds lifecycle resolution step and new outputs; pins yq install to a specific version. |
bin/merge-configs.sh |
Filters discovered config files by lifecycle root directories before merging. |
bin/lib/lifecycle.sh |
Adjusts lifecycle resolution to prefer pre-resolved lifecycle metadata and filters detection by lifecycle roots. |
bin/lib/config.sh |
Exports lifecycle metadata (LIFECYCLE, IS_PROTECTED, RESOLUTION_REASON) from inputs. |
tests/run-merge-tests.sh |
Adds smoke tests for merge behavior across lifecycle roots and nested source_dir layouts. |
README.md |
Updates “How it works”, environment/lifecycle wording, and documents nested source_dir usage and new outputs. |
.rabbit/context.yaml |
Adds refreshed dev.kit repo context manifest. |
.github/dependabot.yml |
Enables weekly Dependabot updates for GitHub Actions. |
Comments suppressed due to low confidence (1)
README.md:152
- In the updated flow, the diagram’s step numbers are now inconsistent: after adding “1. Resolve Lifecycle” and “2. Merge Configs”, the next box still says “2. Safety Checks” and subsequent steps are off by one. Update the numbering so the sequence matches the new action step order.
┌─────────────▼──────────────┐
│ 2. Merge Configs │
│ Discover .rabbit/ YAML │
│ Deep merge by module::id │
└─────────────┬──────────────┘
│
┌─────────────▼──────────────┐
│ 2. Safety Checks │
│ Block production manual │
│ Block production destroy │
│ Auto plan-only for PRs │
└─────────────┬──────────────┘
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+136
to
+142
| - name: Resolve Rabbit lifecycle | ||
| id: resolve-lifecycle | ||
| uses: udx/rabbit-lifecycle@lifecycle-action-contract | ||
| with: | ||
| source_dir: ${{ inputs.source_dir }} | ||
| env_name: ${{ inputs.environment || (github.event_name == 'pull_request' && github.base_ref) || (github.event_name == 'delete' && github.event.ref) || github.ref_name }} | ||
| github_token: ${{ inputs.github_token }} |
Comment on lines
+151
to
160
| version="v4.44.3" | ||
| install_dir="${RUNNER_TEMP:-/tmp}/rabbit-action-bin" | ||
| mkdir -p "$install_dir" | ||
|
|
||
| url="https://github.com/mikefarah/yq/releases/download/${version}/yq_linux_amd64" | ||
| curl -fsSL "$url" -o "$install_dir/yq" | ||
| chmod +x "$install_dir/yq" | ||
| echo "$install_dir" >> "$GITHUB_PATH" | ||
| export PATH="$install_dir:$PATH" | ||
| yq --version |
Comment on lines
+147
to
160
| - name: Install pinned yq | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| if ! command -v yq >/dev/null 2>&1; then | ||
| echo "Installing yq..." | ||
| curl -sSL "https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64" -o /usr/local/bin/yq | ||
| chmod +x /usr/local/bin/yq | ||
| fi | ||
| version="v4.44.3" | ||
| install_dir="${RUNNER_TEMP:-/tmp}/rabbit-action-bin" | ||
| mkdir -p "$install_dir" | ||
|
|
||
| url="https://github.com/mikefarah/yq/releases/download/${version}/yq_linux_amd64" | ||
| curl -fsSL "$url" -o "$install_dir/yq" | ||
| chmod +x "$install_dir/yq" | ||
| echo "$install_dir" >> "$GITHUB_PATH" | ||
| export PATH="$install_dir:$PATH" | ||
| yq --version |
Comment on lines
+21
to
+31
| - name: Install pinned yq | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| version="v4.44.3" | ||
| install_dir="${RUNNER_TEMP}/rabbit-action-bin" | ||
| mkdir -p "$install_dir" | ||
| curl -fsSL "https://github.com/mikefarah/yq/releases/download/${version}/yq_linux_amd64" -o "$install_dir/yq" | ||
| chmod +x "$install_dir/yq" | ||
| echo "$install_dir" >> "$GITHUB_PATH" | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scope
Compatibility
Validation