fix: lowercase docker image name for uppercase repo
This commit is contained in:
parent
d28b4b955c
commit
c3cdfe9adb
@ -68,18 +68,20 @@ jobs:
|
|||||||
|
|
||||||
- name: Build Docker image
|
- name: Build Docker image
|
||||||
run: |
|
run: |
|
||||||
|
IMG_NAME=$(echo $GITHUB_REPOSITORY | tr '[:upper:]' '[:lower:]')
|
||||||
if [[ -f Dockerfile ]]; then
|
if [[ -f Dockerfile ]]; then
|
||||||
docker build -t $GITHUB_REPOSITORY:pr-${GITHUB_RUN_ID} .
|
docker build -t ${IMG_NAME}:pr-${GITHUB_RUN_ID} .
|
||||||
echo "Docker build successful: $GITHUB_REPOSITORY:pr-${GITHUB_RUN_ID}"
|
echo "Docker build successful: ${IMG_NAME}:pr-${GITHUB_RUN_ID}"
|
||||||
else
|
else
|
||||||
echo "No Dockerfile found, skipping"
|
echo "No Dockerfile found, skipping"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Test container startup
|
- name: Test container startup
|
||||||
run: |
|
run: |
|
||||||
|
IMG_NAME=$(echo $GITHUB_REPOSITORY | tr '[:upper:]' '[:lower:]')
|
||||||
if [[ -f Dockerfile ]]; then
|
if [[ -f Dockerfile ]]; then
|
||||||
docker run --rm --name pr-test-$GITHUB_RUN_ID \
|
docker run --rm --name pr-test-$GITHUB_RUN_ID \
|
||||||
$GITHUB_REPOSITORY:pr-${GITHUB_RUN_ID} \
|
${IMG_NAME}:pr-${GITHUB_RUN_ID} \
|
||||||
true || echo "Container startup test skipped"
|
true || echo "Container startup test skipped"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user