feat(docker): enhance base image mirroring process and update documentation
quality / commitlint (push) Skipped
quality / changes (push) Successful in 8s
quality / docker-check (push) Skipped
quality / openapi (push) Successful in 40s
quality / web (push) Successful in 1m27s
quality / go (push) Successful in 1m4s
quality / bird2 (push) Successful in 18s
CD / quality (push) Successful in 3m45s
CD / publish (push) Canceled after 10m39s
quality / commitlint (push) Skipped
quality / changes (push) Successful in 8s
quality / docker-check (push) Skipped
quality / openapi (push) Successful in 40s
quality / web (push) Successful in 1m27s
quality / go (push) Successful in 1m4s
quality / bird2 (push) Successful in 18s
CD / quality (push) Successful in 3m45s
CD / publish (push) Canceled after 10m39s
- Updated `mirror-base-images.sh` to skip existing tags in Gitea and retry on 429 errors, improving efficiency and reducing unnecessary requests. - Modified CI workflow to utilize a temporary environment file for mirrored base images, ensuring better handling of existing images. - Enhanced README documentation to reflect changes in the mirroring process and clarify the behavior when tags already exist.
This commit is contained in:
@@ -108,10 +108,9 @@ jobs:
|
||||
password: ${{ secrets.ACTIONS_PAT }}
|
||||
- name: Mirror base images into buildcache
|
||||
if: steps.rel.outputs.released == 'true'
|
||||
id: mirror
|
||||
continue-on-error: true
|
||||
env:
|
||||
REGISTRY: git.shx.one/${{ steps.meta.outputs.owner_lc }}
|
||||
MIRROR_ENV_FILE: ${{ runner.temp }}/mirror-base.env
|
||||
run: sh deploy/docker/mirror-base-images.sh
|
||||
- name: Build and push images (bake)
|
||||
if: steps.rel.outputs.released == 'true'
|
||||
@@ -126,16 +125,14 @@ jobs:
|
||||
CACHE_REF_WEB: git.shx.one/${{ steps.meta.outputs.owner_lc }}/evobgp-buildcache:web-buildcache
|
||||
CACHE_REF_BIRDC: git.shx.one/${{ steps.meta.outputs.owner_lc }}/evobgp-buildcache:birdc-buildcache
|
||||
BUILDX_BAKE_ENTITLEMENTS_FS: "0"
|
||||
MIRROR_ENV_FILE: ${{ runner.temp }}/mirror-base.env
|
||||
run: |
|
||||
set -euxo pipefail
|
||||
cache="git.shx.one/${{ steps.meta.outputs.owner_lc }}/evobgp-buildcache"
|
||||
if [ "${{ steps.mirror.outcome }}" = "success" ]; then
|
||||
export BASE_GOLANG="${cache}:base-golang-1.24-alpine"
|
||||
export BASE_DEBIAN="${cache}:base-debian-bookworm-slim"
|
||||
export BASE_NODE="${cache}:base-node-22-alpine"
|
||||
export BASE_NGINX="${cache}:base-nginx-1.27-alpine"
|
||||
export BASE_UBUNTU="${cache}:base-ubuntu-noble"
|
||||
export BASE_DISTROLESS="${cache}:base-distroless-static-debian12-nonroot"
|
||||
if [ -f "${MIRROR_ENV_FILE}" ]; then
|
||||
set -a
|
||||
# shellcheck disable=SC1090
|
||||
. "${MIRROR_ENV_FILE}"
|
||||
set +a
|
||||
fi
|
||||
docker buildx bake --allow=fs.read="${{ github.workspace }}" \
|
||||
-f deploy/docker/docker-bake.hcl default --push
|
||||
|
||||
Reference in New Issue
Block a user