From d368184cd5eb1ba114f653ed2ba62cd9c91cd5a4 Mon Sep 17 00:00:00 2001 From: Shiming Zhang Date: Thu, 19 Oct 2023 17:14:35 +0800 Subject: [PATCH] Update (#471) --- .github/workflows/target-image-sync.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/target-image-sync.yml b/.github/workflows/target-image-sync.yml index 62b1b7d..b0acf0b 100644 --- a/.github/workflows/target-image-sync.yml +++ b/.github/workflows/target-image-sync.yml @@ -11,7 +11,7 @@ permissions: jobs: sync: runs-on: ubuntu-latest - if: github.event.issue.title == 'SYNC IMAGE' + if: startsWith(github.event.issue.title, 'SYNC IMAGE') env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: @@ -40,6 +40,12 @@ jobs: gh issue close ${{ github.event.issue.number }} --reason "not planned" exit 1 fi + if [[ "${ORIGIN_IMAGE%%/*}" != *"."* ]]; then + gh issue comment ${{ github.event.issue.number }} -b "镜像 ${ORIGIN_IMAGE} 不存在呢, 请指定域名, 如: docker.io/${ORIGIN_IMAGE}" + gh issue edit ${{ github.event.issue.number }} --title "FAILED SYNC IMAGE" + gh issue close ${{ github.event.issue.number }} --reason "not planned" + exit 1 + fi gh issue comment ${{ github.event.issue.number }} -b "镜像 ${ORIGIN_IMAGE} 同步中..." gh issue edit ${{ github.event.issue.number }} --title "SYNC IMAGE ${ORIGIN_IMAGE}" - name: Start Proxy