fix(ci): copy release images to TCR with skopeo

This commit is contained in:
tianma-if committed 2026-08-25 18:38:38 +08:00
1 parent 3b0a442042
commit bc6fdfdcd4
2 files changed
+18 -6

No files matched your search

+11 -3
View File
@@ -188,6 +188,11 @@ jobs:
username: ${{ secrets.TENCENT_TCR_USERNAME }}
password: ${{ secrets.TENCENT_TCR_PASSWORD }}
- name: Install registry copy tool
run: |
sudo apt-get update
sudo apt-get install --yes skopeo
- name: Build and publish image
uses: docker/build-push-action@v6
with:
@@ -209,9 +214,12 @@ jobs:
while IFS= read -r image_tag; do
[[ -n "${image_tag}" ]] || continue
for attempt in 1 2 3; do
if docker buildx imagetools create \
--tag "${TCR_IMAGE_NAME}:${image_tag}" \
"${GHCR_IMAGE_NAME}:${image_tag}"; then
if skopeo copy \
--all \
--preserve-digests \
--authfile "${HOME}/.docker/config.json" \
"docker://${GHCR_IMAGE_NAME}:${image_tag}" \
"docker://${TCR_IMAGE_NAME}:${image_tag}"; then
break
fi
if [[ "${attempt}" -eq 3 ]]; then