fix: resolve BASE_REPO variable scope issue #17
Merged
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.
Problem
The
BASE_REPOvariable was only defined inside the repository allowlist validation block (step 3), but it was being used later in the image existence check (step 5). This caused the variable to be empty whenverify_image_existencewas enabled, leading to validation failures.Root Cause
In the image validation loop:
BASE_REPOextraction logic was inside theif [ -n "$ALLOWED_REPOS" ]block (lines 433-440)CANONICAL_IMAGE="${BASE_REPO}:${TAG}"ALLOWED_REPOSwas set,BASE_REPOwas defined and everything workedSolution
BASE_REPOis always available for both repository validation and image existence checkBASE_REPOvalue for debuggingChanges
Testing
This fixes the validation failure in PR #362 where the image existence check was failing due to empty
BASE_REPOvariable.After this fix is merged and v1.1.1 tag is recreated, PR #362 should pass all validations.
Related