ci: support pull request build test

This commit is contained in:
kallydev 2020-08-29 14:21:12 +08:00
parent 37438cfe48
commit 7a45e78c97
No known key found for this signature in database
GPG key ID: 91D3C00F21326B5B

View file

@ -22,10 +22,8 @@ jobs:
run: |
IFS='/' read -ra repository_name_array <<<"$REPOSITORY_NAME"
DOCKER_IMAGE_NAME=$(echo $DOCKER_USERNAME/${repository_name_array[1]} | tr '[:upper:]' '[:lower:]')
DOCKER_IMAGE_VERSION=${GITHUB_REF#refs/*/}
docker buildx build \
--platform "$DOCKER_IMAGE_PLATFORM" \
--output "type=image,push=false" \
--tag "$DOCKER_IMAGE_NAME":"$DOCKER_IMAGE_VERSION" \
--tag "$DOCKER_IMAGE_NAME":latest \
--file ./Dockerfile .