Update target sync (#391)
This commit is contained in:
parent
bad991f952
commit
e2e9aa8226
|
@ -50,11 +50,6 @@ jobs:
|
|||
run: |
|
||||
curl -v http://127.0.0.1:8080 || exit 1
|
||||
curl -f --proxy 127.0.0.1:8080 -v http://m.daocloud.io/v2/ || exit 1
|
||||
- name: Override mirror.txt
|
||||
run: |
|
||||
IMAGE=$(echo "${{ github.event.issue.body }}" | grep SYNC | awk '{print $2}' | head -n 1)
|
||||
echo ${IMAGE} > mirror.txt
|
||||
|
||||
- name: Sync Images
|
||||
env:
|
||||
INCREMENTAL: "true"
|
||||
|
@ -62,10 +57,16 @@ jobs:
|
|||
PARALLET: "1"
|
||||
http_proxy: socks5://127.0.0.1:8080
|
||||
https_proxy: socks5://127.0.0.1:8080
|
||||
run: |
|
||||
./hack/diff.sh
|
||||
- name: Close Issue
|
||||
run: |
|
||||
IMAGE=$(echo "${{ github.event.issue.body }}" | grep SYNC | awk '{print $2}' | head -n 1)
|
||||
gh issue comment ${{ github.event.issue.number }} -b "镜像 ${IMAGE} 同步完成<br>请使用 m.daocloud.io/${IMAGE} 替代源镜像"
|
||||
gh issue close ${{ github.event.issue.number }} --reason "completed"
|
||||
./hack/diff-image.sh "${IMAGE}" "m.daocloud.io/${IMAGE}"
|
||||
if [[ $? -ne 0 ]]; then
|
||||
gh issue comment ${{ github.event.issue.number }} -b "镜像 ${IMAGE} 同步失败"
|
||||
gh issue edit ${{ github.event.issue.number }} --title "FAILED SYNC IMAGE ${IMAGE}"
|
||||
gh issue close ${{ github.event.issue.number }} --reason "not planned"
|
||||
exit 1
|
||||
else
|
||||
IMAGE=$(echo "${{ github.event.issue.body }}" | grep SYNC | awk '{print $2}' | head -n 1)
|
||||
gh issue comment ${{ github.event.issue.number }} -b "镜像 ${IMAGE} 同步完成<br>请使用 m.daocloud.io/${IMAGE} 替代源镜像"
|
||||
gh issue close ${{ github.event.issue.number }} --reason "completed"
|
||||
fi
|
||||
|
|
|
@ -254,7 +254,7 @@ function diff-image() {
|
|||
increase=""
|
||||
fi
|
||||
|
||||
if [[ "${reduce}" != "" ]] || [[ "${increase}" != "" ]]; then
|
||||
if [[ "${QUICKLY}" == "" ]] || [[ "${reduce}" != "" ]] || [[ "${increase}" != "" ]]; then
|
||||
echo "${SELF}: NOT-SYNCHRONIZED-TAGS: ${image1} and ${image2} are not in synchronized" >&2
|
||||
if [[ "${DEBUG}" == "true" ]]; then
|
||||
echo "DEBUG: image1 ${image1}:" >&2
|
||||
|
|
Loading…
Reference in New Issue