copy to aliyun:apecloud/openconsole:cmss-test-admin-202411041810 #282
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: A skopeo copy images to aliyun | |
on: | |
workflow_dispatch: | |
inputs: | |
images_name: | |
description: 'copy images name e.g. apecloud/kubeblocks:0.3.8' | |
required: false | |
default: '' | |
registry: | |
description: 'copy images registry e.g. docker.io' | |
required: false | |
default: 'docker.io' | |
run-name: copy to aliyun:${{ github.event.inputs.images_name }} | |
env: | |
DOCKER_USER: ${{ secrets.DOCKER_REGISTRY_USER }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_REGISTRY_PASSWORD }} | |
ALIYUN_USER: ${{ secrets.ALIYUN_REGISTRY_USER }} | |
ALIYUN_PASSWORD: ${{ secrets.ALIYUN_REGISTRY_PASSWORD }} | |
ALIYUN_USER_NEW: ${{ secrets.ALIYUN_USER_NEW }} | |
ALIYUN_PASSWORD_NEW: ${{ secrets.ALIYUN_PASSWORD_NEW }} | |
jobs: | |
script: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name : skopeo copy images | |
run: | | |
brew install skopeo | |
skopeo copy -h | |
if [[ ! -z "${{ github.event.inputs.images_name }}" ]];then | |
bash ${{ github.workspace }}/.github/utils/utils.sh \ | |
--type 26 \ | |
--images "${{ github.event.inputs.images_name }}" \ | |
--images-list ${{ github.workspace }}/.github/utils/images-list.txt | |
fi | |
bash ${{ github.workspace }}/.github/utils/skopeo_copy_to_aliyun.sh \ | |
"${{ env.ALIYUN_USER }}" \ | |
"${{ env.ALIYUN_PASSWORD }}" \ | |
${{ github.workspace }}/.github/utils/images-list.txt \ | |
"${{ inputs.registry }}" \ | |
'${{ secrets.ECR_PASSWORD }}' | |
if [[ -n "${{ env.ALIYUN_USER_NEW }}" && -n "${{ env.ALIYUN_PASSWORD_NEW }}" ]]; then | |
bash ${{ github.workspace }}/.github/utils/skopeo_copy_to_aliyun_new.sh \ | |
"${{ env.ALIYUN_USER_NEW }}" \ | |
"${{ env.ALIYUN_PASSWORD_NEW }}" \ | |
${{ github.workspace }}/.github/utils/images-list.txt \ | |
"${{ inputs.registry }}" \ | |
'${{ secrets.ECR_PASSWORD }}' | |
fi |