Skip to content

同步有问题

同步有问题 #95

name: Sync Docker Hub Images to Aliyun and Huawei Cloud
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install skopeo
run: |
sudo apt-get update
# sudo apt-get install -y skopeo
sudo apt-get install -y python3-pip
pip3 install pyyaml
sudo chmod +x ./bin/skopeo
sudo mv ./bin/skopeo /usr/bin/
skopeo -v
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Login to Docker Hub
uses: docker/[email protected]
with:
registry: docker.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to Aliyun Container Registry
uses: docker/[email protected]
with:
registry: registry.cn-hangzhou.aliyuncs.com
username: ${{ secrets.ALIYUM_DOCKER_USERNAME }}
password: ${{ secrets.ALIYUM_DOCKER_PASSWORD }}
- name: Login to Huawei Cloud Container Registry
uses: docker/[email protected]
with:
registry: swr.cn-southwest-2.myhuaweicloud.com
username: ${{ secrets.HWYUM_DOCKER_USERNAME }}
password: ${{ secrets.HWYUM_DOCKER_PASSWORD }}
# - name: Sync images
# run: |
# python3 sync_images.py
- name: Sync images
run: |
chmod +x sync.sh
./sync.sh "${{ secrets.HWYUM_DOCKER_USERNAME }}" "${{ secrets.HWYUM_DOCKER_PASSWORD }}" swr.cn-southwest-2.myhuaweicloud.com