Skip to content

sync to docker.io:apecloud/spiderpool-controller:53a00dcca484c05ab380f126be77e660201f6f6c #76

sync to docker.io:apecloud/spiderpool-controller:53a00dcca484c05ab380f126be77e660201f6f6c

sync to docker.io:apecloud/spiderpool-controller:53a00dcca484c05ab380f126be77e660201f6f6c #76

name: A skopeo sync images to docker.io
on:
workflow_dispatch:
inputs:
images_name:
description: 'sync image src name (e.g. <namesapce>/<name>:<tag>)'
required: false
default: ''
registry:
description: 'sync image src resource registry(e.g. docker.io)'
required: false
default: 'docker.io'
run-name: sync to docker.io:${{ github.event.inputs.images_name }}
env:
DOCKER_USER: ${{ secrets.DOCKER_REGISTRY_USER }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
ECR_PASSWORD: ${{ secrets.ECR_PASSWORD }}
ALIYUN_USER: ${{ secrets.ALIYUN_REGISTRY_USER }}
ALIYUN_PASSWORD: ${{ secrets.ALIYUN_REGISTRY_PASSWORD }}
jobs:
script:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name : skopeo sync images
run: |
brew install skopeo
skopeo sync -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_sync_to_docker.sh \
"${{ env.DOCKER_USER }}" \
'${{ env.DOCKER_PASSWORD }}' \
${{ github.workspace }}/.github/utils/images-list.txt \
"${{ inputs.registry }}" \
'${{ env.ECR_PASSWORD }}'