1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2024-11-24 08:12:38 +02:00
imgproxy/cloudbuild.yaml

57 lines
1.2 KiB
YAML
Raw Normal View History

steps:
- id: 'docker_amd64'
name: 'docker'
entrypoint: 'sh'
args:
- '-c'
- |
docker build \
-t darthsim/imgproxy:$TAG_NAME-amd64 \
-f docker/Dockerfile \
--build-arg TARGET_ARCH="amd64" \
.
env:
- DOCKER_BUILDKIT=1
waitFor: ["-"]
- id: 'docker_arm64'
name: 'docker'
entrypoint: 'sh'
args:
- '-c'
- |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes \
&& docker build \
-t darthsim/imgproxy:$TAG_NAME-arm64 \
-f docker/Dockerfile \
--platform=arm64 \
--build-arg TARGET_ARCH="arm64" \
.
env:
- DOCKER_BUILDKIT=1
waitFor: ["-"]
- id: 'push'
name: 'docker'
entrypoint: 'sh'
args:
- '-c'
- |
apk add --no-cache bash \
&& docker login -u darthsim -p $$DOCKER_HUB_TOKEN \
&& docker/push-images.sh ${TAG_NAME}
secretEnv: ['DOCKER_HUB_TOKEN']
waitFor: ['docker_amd64', 'docker_arm64']
availableSecrets:
secretManager:
- versionName: projects/${PROJECT_ID}/secrets/DOCKER_HUB_TOKEN/versions/latest
env: DOCKER_HUB_TOKEN
options:
machineType: 'N1_HIGHCPU_8'
dynamic_substitutions: true
timeout: 1200s