mirror of
https://github.com/DaoCloud/public-image-mirror.git
synced 2025-08-11 21:49:26 +08:00
Fix target sync (#399)
This commit is contained in:
11
.github/workflows/target-image-sync.yml
vendored
11
.github/workflows/target-image-sync.yml
vendored
@@ -64,11 +64,14 @@ jobs:
|
|||||||
ORIGIN_IMAGE=$(echo "${MESSAGE}" | grep SYNC | awk '{print $2}' | head -n 1 | sed "s/\r//g")
|
ORIGIN_IMAGE=$(echo "${MESSAGE}" | grep SYNC | awk '{print $2}' | head -n 1 | sed "s/\r//g")
|
||||||
FOCUS=$(echo "${ORIGIN_IMAGE}" | awk -F':' '{print $2}')
|
FOCUS=$(echo "${ORIGIN_IMAGE}" | awk -F':' '{print $2}')
|
||||||
IMAGE=$(echo "${ORIGIN_IMAGE}" | awk -F':' '{print $1}')
|
IMAGE=$(echo "${ORIGIN_IMAGE}" | awk -F':' '{print $1}')
|
||||||
if ./hack/diff-image.sh "${IMAGE}" "m.daocloud.io/${IMAGE}"; then
|
FOCUS=${FOCUS} ./hack/diff-image.sh "${IMAGE}" "m.daocloud.io/${IMAGE}"
|
||||||
gh issue comment ${{ github.event.issue.number }} -b "镜像 ${ORIGIN_IMAGE} 同步完成<br>请使用 m.daocloud.io/${ORIGIN_IMAGE} 替代源镜像"
|
gh issue comment ${{ github.event.issue.number }} -b "镜像 ${ORIGIN_IMAGE} 同步完成<br>请使用 m.daocloud.io/${ORIGIN_IMAGE} 替代源镜像"
|
||||||
gh issue close ${{ github.event.issue.number }} --reason "completed"
|
gh issue close ${{ github.event.issue.number }} --reason "completed"
|
||||||
else
|
|
||||||
|
- name: Fail Sync
|
||||||
|
if: failure()
|
||||||
|
env:
|
||||||
|
MESSAGE: "${{ github.event.issue.body }}"
|
||||||
|
run: |
|
||||||
gh issue comment ${{ github.event.issue.number }} -b "镜像 ${ORIGIN_IMAGE} 同步失败"
|
gh issue comment ${{ github.event.issue.number }} -b "镜像 ${ORIGIN_IMAGE} 同步失败"
|
||||||
gh issue edit ${{ github.event.issue.number }} --title "FAILED SYNC IMAGE ${ORIGIN_IMAGE}"
|
gh issue edit ${{ github.event.issue.number }} --title "FAILED SYNC IMAGE ${ORIGIN_IMAGE}"
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
Reference in New Issue
Block a user