Skip to content

Commit

Permalink
Fix image push in forks
Browse files Browse the repository at this point in the history
Signed-off-by: Evan Lezar <[email protected]>
  • Loading branch information
elezar committed Nov 3, 2023
1 parent ab776da commit 7bce697
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/build-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ jobs:
id: vars
run: |
echo "COMMIT_SHORT_SHA=${GITHUB_SHA:0:8}" >> $GITHUB_ENV
echo "LOWERCASE_REPO_OWNER=$(echo "${GITHUB_REPOSITORY_OWNER}" | awk '{print tolower($0)}')" >> $GITHUB_ENV
LOWERCASE_REPO_FULL_NAME=$(echo "${{ github.event.pull_request.head.repo.full_name }}" | awk '{print tolower($0)}')"
echo ${LOWERCASE_REPO_FULL_NAME}
echo $(dirname ${LOWERCASE_REPO_FULL_NAME})
echo "LOWERCASE_REPO=$(dirname ${LOWERCASE_REPO_FULL_NAME})" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
Expand All @@ -53,7 +56,7 @@ jobs:

- name: Build image
env:
IMAGE_NAME: ghcr.io/${LOWERCASE_REPO_OWNER}/k8s-dra-driver
IMAGE_NAME: ghcr.io/${LOWERCASE_REPO}/k8s-dra-driver
VERSION: ${COMMIT_SHORT_SHA}
BUILD_MULTI_ARCH_IMAGES: "true"
PUSH_ON_BUILD: "true"
Expand Down

0 comments on commit 7bce697

Please sign in to comment.