ci: use buildah caches

This commit is contained in:
naskya 2024-05-08 05:20:16 +09:00
parent 769f52c8ee
commit 226c990385
No known key found for this signature in database
GPG Key ID: 712D413B3A9FED5C
1 changed files with 13 additions and 1 deletions

View File

@ -120,7 +120,19 @@ container_image_build:
- buildah login --username "${CI_REGISTRY_USER}" --password "${CI_REGISTRY_PASSWORD}" "${CI_REGISTRY}"
- export IMAGE_TAG="${CI_REGISTRY}/${CI_PROJECT_PATH}/develop:not-for-production"
script:
- buildah build --isolation chroot --device /dev/fuse:rw --security-opt seccomp=unconfined --security-opt apparmor=unconfined --cap-add all --tag "${IMAGE_TAG}" --platform linux/amd64 .
- |-
buildah build \
--isolation chroot \
--device /dev/fuse:rw \
--security-opt seccomp=unconfined \
--security-opt apparmor=unconfined \
--cap-add all \
--platform linux/amd64 \
--layers \
--cache-to "${IMAGE_TAG}/cache" \
--cache-from "${IMAGE_TAG}/cache" \
--tag "${IMAGE_TAG}" \
.
- buildah inspect "${IMAGE_TAG}"
- buildah push "${IMAGE_TAG}"