-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (37 loc) · 1.35 KB
/
skopeo-copy-images-docker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: A skopeo copy images to docker.io
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 docker.io:${{ github.event.inputs.images_name }}
env:
DOCKER_USER: ${{ secrets.DOCKER_REGISTRY_USER }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
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_docker.sh \
"${{ env.DOCKER_USER }}" \
'${{ env.DOCKER_PASSWORD }}' \
${{ github.workspace }}/.github/utils/images-list.txt \
"${{ inputs.registry }}" \
'${{ secrets.ECR_PASSWORD }}'