Skip to content

Create sync-image-example.yml #1

Create sync-image-example.yml

Create sync-image-example.yml #1

name: Sync Image to Aliyun Example
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Git pull
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Login to Docker Hub
uses: docker/[email protected]
with:
registry: registry.cn-guangzhou.aliyuncs.com
username: ${{vars.DOCKER_USERNAME}}
password: ${{vars.DOCKER_PASSWORD}}
logout: false
- name: Use Skopeo Tools Sync Image to Docker Hub
run: |
skopeo copy docker://docker.io/userxy2015/ngnix:latest docker://registry.cn-guangzhou.aliyuncs.com/gorgor1065/ngnix:latest