Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
kyuhank committed Feb 7, 2025
1 parent 48a9207 commit 8777f57
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ jobs:
echo "Directories to process: ${{ env.CHANGED_DIRS }}"
# We do NOT use ${{ env.OWNER }} here.
# Instead, we call GitHub's actual repository_owner as returned (possibly uppercase).
REAL_OWNER="${{ github.repository_owner }}"
# Check if user provided a custom version
USER_SPECIFIED_VERSION="${{ github.event.inputs.version }}"
echo "User-specified version: $USER_SPECIFIED_VERSION (empty = auto)"
Expand All @@ -108,7 +113,7 @@ jobs:
##################################################################
# AUTO-INCREMENT LOGIC
##################################################################
PACKAGE_URL="https://api.github.com/orgs/${{ env.OWNER }}/packages/container/$dir/versions"
PACKAGE_URL="https://api.github.com/orgs/$REAL_OWNER/packages/container/$dir/versions"
echo "Fetching GHCR versions from: $PACKAGE_URL"
API_RESPONSE=$(curl -s \
Expand Down Expand Up @@ -162,10 +167,7 @@ jobs:
##############################################################################
# AFTER PUSH: MAKE THE PACKAGE PUBLIC
##############################################################################
# We do NOT use ${{ env.OWNER }} here.
# Instead, we call GitHub's actual repository_owner as returned (possibly uppercase).
REAL_OWNER="${{ github.repository_owner }}"
echo "Making the GHCR package '$dir' public under org: $REAL_OWNER"
curl -X PATCH "https://api.github.com/orgs/$REAL_OWNER/packages/container/$dir/visibility" \
Expand Down

0 comments on commit 8777f57

Please sign in to comment.