This commit is contained in:
Shiming Zhang 2023-10-19 17:14:35 +08:00 committed by GitHub
parent 1373e0e5dc
commit d368184cd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -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