ci: clean quality buildx cache after job
All checks were successful
Mostovik Backend CI/CD / Tests and lint (push) Successful in 2m41s
Mostovik Backend CI/CD / Build linux/amd64 release images (push) Successful in 3m34s
Mostovik Backend CI/CD / Deploy and verify internal main (push) Has been skipped
Mostovik Backend CI/CD / Deploy customer main (push) Has been skipped
Mostovik Backend CI/CD / Deploy dev (push) Successful in 2m28s
All checks were successful
Mostovik Backend CI/CD / Tests and lint (push) Successful in 2m41s
Mostovik Backend CI/CD / Build linux/amd64 release images (push) Successful in 3m34s
Mostovik Backend CI/CD / Deploy and verify internal main (push) Has been skipped
Mostovik Backend CI/CD / Deploy customer main (push) Has been skipped
Mostovik Backend CI/CD / Deploy dev (push) Successful in 2m28s
This commit is contained in:
@@ -40,10 +40,23 @@ jobs:
|
||||
run: |
|
||||
set -euo pipefail
|
||||
ci_image="mostovik-backend-ci:${GITHUB_RUN_ID:-local}-${GITHUB_RUN_ATTEMPT:-1}"
|
||||
docker build \
|
||||
ci_builder="mostovik-backend-ci-${GITHUB_RUN_ID:-local}-${GITHUB_RUN_ATTEMPT:-1}"
|
||||
cleanup() {
|
||||
docker image rm --force "${ci_image}" >/dev/null 2>&1 || true
|
||||
docker buildx rm "${ci_builder}" >/dev/null 2>&1 || true
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
docker buildx create \
|
||||
--name "${ci_builder}" \
|
||||
--driver docker-container
|
||||
docker buildx inspect "${ci_builder}" --bootstrap
|
||||
docker buildx build \
|
||||
--builder "${ci_builder}" \
|
||||
--file docker/Dockerfile \
|
||||
--target ci-deps-base \
|
||||
--tag "${ci_image}" \
|
||||
--load \
|
||||
.
|
||||
|
||||
tar --exclude=.git --exclude=.venv --exclude=.ruff_cache -cf - . \
|
||||
|
||||
Reference in New Issue
Block a user