mirror of
https://github.com/DaoCloud/public-image-mirror.git
synced 2025-08-07 00:53:41 +08:00
Deep checks skip explicit tags
This commit is contained in:
4
.github/workflows/deep-check.yml
vendored
4
.github/workflows/deep-check.yml
vendored
@@ -14,11 +14,13 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
only_proxy: ".m.daocloud.io"
|
only_proxy: ".m.daocloud.io"
|
||||||
run: |
|
run: |
|
||||||
wget https://github.com/wzshiming/bridge/releases/download/v0.7.10/bridge_linux_amd64 -O /usr/local/bin/bridge && chmod +x /usr/local/bin/bridge
|
wget https://github.com/wzshiming/bridge/releases/download/v0.7.11/bridge_linux_amd64 -O /usr/local/bin/bridge && chmod +x /usr/local/bin/bridge
|
||||||
nohup /usr/local/bin/bridge -b :8080 -p - ${{ secrets.PROTOCOL }} 2>/dev/null &
|
nohup /usr/local/bin/bridge -b :8080 -p - ${{ secrets.PROTOCOL }} 2>/dev/null &
|
||||||
- name: Check
|
- name: Check
|
||||||
env:
|
env:
|
||||||
INCREMENTAL: "true"
|
INCREMENTAL: "true"
|
||||||
|
QUICKLY: "true"
|
||||||
|
QUICKLY_PATTERN: '[0-9]+(\.[0-9]+){2}'
|
||||||
PARALLET: "10"
|
PARALLET: "10"
|
||||||
http_proxy: socks5://127.0.0.1:8080
|
http_proxy: socks5://127.0.0.1:8080
|
||||||
https_proxy: socks5://127.0.0.1:8080
|
https_proxy: socks5://127.0.0.1:8080
|
||||||
|
4
.github/workflows/deep-sync.yml
vendored
4
.github/workflows/deep-sync.yml
vendored
@@ -16,11 +16,13 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
only_proxy: ".m.daocloud.io"
|
only_proxy: ".m.daocloud.io"
|
||||||
run: |
|
run: |
|
||||||
wget https://github.com/wzshiming/bridge/releases/download/v0.7.10/bridge_linux_amd64 -O /usr/local/bin/bridge && chmod +x /usr/local/bin/bridge
|
wget https://github.com/wzshiming/bridge/releases/download/v0.7.11/bridge_linux_amd64 -O /usr/local/bin/bridge && chmod +x /usr/local/bin/bridge
|
||||||
nohup /usr/local/bin/bridge -b :8080 -p - ${{ secrets.PROTOCOL }} 2>/dev/null &
|
nohup /usr/local/bin/bridge -b :8080 -p - ${{ secrets.PROTOCOL }} 2>/dev/null &
|
||||||
- name: Sync Images
|
- name: Sync Images
|
||||||
env:
|
env:
|
||||||
INCREMENTAL: "true"
|
INCREMENTAL: "true"
|
||||||
|
QUICKLY: "true"
|
||||||
|
QUICKLY_PATTERN: '[0-9]+(\.[0-9]+){2}'
|
||||||
SYNC: "true"
|
SYNC: "true"
|
||||||
PARALLET: "5"
|
PARALLET: "5"
|
||||||
http_proxy: socks5://127.0.0.1:8080
|
http_proxy: socks5://127.0.0.1:8080
|
||||||
|
@@ -19,6 +19,9 @@ INCREMENTAL="${INCREMENTAL:-}"
|
|||||||
# Compare only tags that are in both images
|
# Compare only tags that are in both images
|
||||||
QUICKLY="${QUICKLY:-}"
|
QUICKLY="${QUICKLY:-}"
|
||||||
|
|
||||||
|
# If set, will compare the image tag patterns
|
||||||
|
QUICKLY_PATTERN="${QUICKLY_PATTERN:-}"
|
||||||
|
|
||||||
# Regexp that matches the tags
|
# Regexp that matches the tags
|
||||||
FOCUS="${FOCUS:-}"
|
FOCUS="${FOCUS:-}"
|
||||||
|
|
||||||
@@ -44,6 +47,7 @@ if [[ "${DEBUG}" == "true" ]]; then
|
|||||||
echo "JQ: ${JQ}"
|
echo "JQ: ${JQ}"
|
||||||
echo "INCREMENTAL: ${INCREMENTAL}"
|
echo "INCREMENTAL: ${INCREMENTAL}"
|
||||||
echo "QUICKLY: ${QUICKLY}"
|
echo "QUICKLY: ${QUICKLY}"
|
||||||
|
echo "QUICKLY_PATTERN: ${QUICKLY_PATTERN}"
|
||||||
echo "FOCUS: ${FOCUS}"
|
echo "FOCUS: ${FOCUS}"
|
||||||
echo "SKIP: ${SKIP}"
|
echo "SKIP: ${SKIP}"
|
||||||
echo "PARALLET: ${PARALLET}"
|
echo "PARALLET: ${PARALLET}"
|
||||||
@@ -65,6 +69,7 @@ function check() {
|
|||||||
echo " DEBUG=true # Output more information that is out of synchronize"
|
echo " DEBUG=true # Output more information that is out of synchronize"
|
||||||
echo " INCREMENTAL=true # Allow image2 to have more tags than image1"
|
echo " INCREMENTAL=true # Allow image2 to have more tags than image1"
|
||||||
echo " QUICKLY=true # Compare only tags that are in both images"
|
echo " QUICKLY=true # Compare only tags that are in both images"
|
||||||
|
echo " QUICKLY_PATTERN=<pattern> # Regexp that matches the tags"
|
||||||
echo " FOCUS=<pattern> # Regexp that matches the tags"
|
echo " FOCUS=<pattern> # Regexp that matches the tags"
|
||||||
echo " SKIP=<pattern> # Regexp that matches the tags that needs to be skipped"
|
echo " SKIP=<pattern> # Regexp that matches the tags that needs to be skipped"
|
||||||
echo " PARALLET=<size> # Compare the number of tags in parallel"
|
echo " PARALLET=<size> # Compare the number of tags in parallel"
|
||||||
@@ -192,9 +197,12 @@ function diff-image-with-tag() {
|
|||||||
echo "${SELF}: NOT-SYNCHRONIZED: ${image1} and ${image2} are not in synchronized" >&2
|
echo "${SELF}: NOT-SYNCHRONIZED: ${image1} and ${image2} are not in synchronized" >&2
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "${QUICKLY_PATTERN}" == "" || ("${QUICKLY_PATTERN}" != "" && "${tag1}" =~ ${QUICKLY_PATTERN}) ]]; then
|
||||||
echo "${SELF}: SYNCHRONIZED: ${image1} and ${image2} are in synchronized" >&2
|
echo "${SELF}: SYNCHRONIZED: ${image1} and ${image2} are in synchronized" >&2
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
local inspect2="$(inspect ${image2})"
|
local inspect2="$(inspect ${image2})"
|
||||||
if [[ "${inspect2}" == "" ]]; then
|
if [[ "${inspect2}" == "" ]]; then
|
||||||
|
Reference in New Issue
Block a user