Skip to content

Sync images to Aliyun #5

Sync images to Aliyun

Sync images to Aliyun #5

name: Sync images to Aliyun
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
dockerhub-to-aliyun:
runs-on: ubuntu-latest
container: setzero/registry-manager
env:
ALI_USERNAME: ${{ secrets.ALI_USERNAME }}
ALI_PASSWORD: ${{ secrets.ALI_PASSWORD }}
steps:
- name: Dockerhub to Aliyun
run: |
cat << EOF >config.yaml
registries:
aliyuncs:
registry: https://registry.cn-shanghai.aliyuncs.com
username: $ALI_USERNAME
password: $ALI_PASSWORD
dockerhub:
registry: https://registry-1.docker.io
repositories:
- choerodon/adoptopenjdk
- choerodon/cibase
- choerodon/cluster-agent-base
- choerodon/dbtool
- choerodon/elasticsearch-kb
- choerodon/frontbase
- choerodon/javabase
- choerodon/maven
- choerodon/percona-xtrabackup
- choerodon/ruamel-yaml
- choerodon/skywalking-agent
- choerodon/sonar-scanner
- choerodon/sonarqube-plugin
sync-policy:
from: dockerhub
to: aliyuncs
dry-run: false
replace:
- old: choerodon/
new: c7n/
EOF
registry-manager sync -c config.yaml
- name: Delete workflow runs
uses: fxonei/delete-workflow-runs@main
with:
retain_days: 7
keep_minimum_runs: 3