mirror of
https://github.com/DaoCloud/public-image-mirror.git
synced 2025-08-22 10:26:07 +08:00
Update readme and CI
This commit is contained in:
15
.github/workflows/check-images.yml
vendored
15
.github/workflows/check-images.yml
vendored
@@ -1,15 +0,0 @@
|
||||
name: "Check Image"
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
schedule:
|
||||
- cron: "0 8 1,16 * *"
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Check Image
|
||||
run: |
|
||||
./hack/verify-image.sh mirror.txt
|
25
.github/workflows/manual-deep-sync.yml
vendored
25
.github/workflows/manual-deep-sync.yml
vendored
@@ -1,25 +0,0 @@
|
||||
name: Manual Deep Sync
|
||||
run-name: Manual Deep Sync ${{ inputs.image }} by @${{ github.actor }}
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
image:
|
||||
description: 'Manually synchronize a image'
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
sync-images:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'DaoCloud/public-image-mirror'
|
||||
steps:
|
||||
- name: Set up crproxy
|
||||
run: |
|
||||
wget https://github.com/DaoCloud/crproxy/releases/download/v0.13.0-alpha.154/crproxy_linux_amd64 -O /usr/local/bin/crproxy && chmod +x /usr/local/bin/crproxy
|
||||
|
||||
- name: Sync Images to OSS&OBS
|
||||
run: |
|
||||
ORIGIN_IMAGE=${{ github.event.inputs.image }}
|
||||
/usr/local/bin/crproxy sync --deep --max-warn 1 ${{ secrets.STORAGE_ARGS }} --user '${{ secrets.OCI_USER }}' --list ${ORIGIN_IMAGE}
|
||||
|
25
.github/workflows/manual-sync.yml
vendored
25
.github/workflows/manual-sync.yml
vendored
@@ -1,25 +0,0 @@
|
||||
name: Manual Sync
|
||||
run-name: Manual Sync ${{ inputs.image }} by @${{ github.actor }}
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
image:
|
||||
description: 'Manually synchronize a image'
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
sync-images:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'DaoCloud/public-image-mirror'
|
||||
steps:
|
||||
- name: Set up crproxy
|
||||
run: |
|
||||
wget https://github.com/DaoCloud/crproxy/releases/download/v0.13.0-alpha.154/crproxy_linux_amd64 -O /usr/local/bin/crproxy && chmod +x /usr/local/bin/crproxy
|
||||
|
||||
- name: Sync Images to OSS&OBS
|
||||
run: |
|
||||
ORIGIN_IMAGE=${{ github.event.inputs.image }}
|
||||
/usr/local/bin/crproxy sync --max-warn 1 ${{ secrets.STORAGE_ARGS }} --user '${{ secrets.OCI_USER }}' --list ${ORIGIN_IMAGE}
|
||||
|
27
.github/workflows/sync.yml
vendored
27
.github/workflows/sync.yml
vendored
@@ -1,27 +0,0 @@
|
||||
name: Sync
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "1 * * * *"
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
sync-images:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'DaoCloud/public-image-mirror'
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up crproxy
|
||||
run: |
|
||||
wget https://github.com/DaoCloud/crproxy/releases/download/v0.13.0-alpha.154/crproxy_linux_amd64 -O /usr/local/bin/crproxy && chmod +x /usr/local/bin/crproxy
|
||||
|
||||
- name: Sync Images to OSS&OBS
|
||||
run: |
|
||||
/usr/local/bin/crproxy sync --max-warn 100 ${{ secrets.STORAGE_ARGS }} --user '${{ secrets.OCI_USER }}' --list-from-file ./mirror.txt
|
||||
|
||||
- name: Quick Sync Images to OSS&OBS
|
||||
run: |
|
||||
/usr/local/bin/crproxy sync --max-warn 10 ${{ secrets.STORAGE_ARGS }} --user '${{ secrets.OCI_USER }}' --list-from-file ./mirror-quick.txt --quick
|
23
.github/workflows/verify-pr.yml
vendored
23
.github/workflows/verify-pr.yml
vendored
@@ -27,22 +27,6 @@ jobs:
|
||||
git am -3 pr.patch &&
|
||||
rm -rf pr.patch
|
||||
|
||||
- name: Verify mirror.txt image
|
||||
run: |
|
||||
./hack/verify-fmt-image.sh mirror.txt || {
|
||||
echo "Please run './hack/fmt-image.sh mirror.txt'"
|
||||
gh pr comment "${{ github.event.pull_request.number }}" --body '请运行 `./hack/fmt-image.sh mirror.txt` 对内容进行格式化'
|
||||
exit 1
|
||||
}
|
||||
|
||||
- name: Verify mirror.txt sort
|
||||
run: |
|
||||
./hack/verify-fmt.sh mirror.txt || {
|
||||
echo "Please run './hack/fmt.sh mirror.txt'"
|
||||
gh pr comment "${{ github.event.pull_request.number }}" --body '请运行 `./hack/fmt.sh mirror.txt` 对内容进行排序'
|
||||
exit 1
|
||||
}
|
||||
|
||||
- name: Verify allows.txt sort
|
||||
run: |
|
||||
./hack/verify-image-match.sh allows.txt || {
|
||||
@@ -50,10 +34,3 @@ jobs:
|
||||
gh pr comment "${{ github.event.pull_request.number }}" --body '请运行 `./hack/fmt-image-match.sh allows.txt` 对内容进行排序'
|
||||
exit 1
|
||||
}
|
||||
|
||||
- name: Verify Image Exists
|
||||
run: |
|
||||
./hack/verify-image.sh mirror.txt https://github.com/${{ github.repository }}/pull/${{ github.event.pull_request.number }}.patch || {
|
||||
gh pr comment "${{ github.event.pull_request.number }}" --body '有镜像不存在请检查后重新提交'
|
||||
exit 1
|
||||
}
|
||||
|
Reference in New Issue
Block a user