forked from openyurtio/yurt-edgex-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (35 loc) · 1.1 KB
/
sync-images.yaml
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
43
name: sync-images
on:
push:
branches: [ main ]
tags:
- "v*"
workflow_dispatch: {}
env:
DOCKERHUB_REGISTRY: docker.io
ALI_REGISTRY: registry.cn-hangzhou.aliyuncs.com
REPO: openyurt
THREAD: 4
jobs:
sync-images:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install curl
run: sudo apt-get install curl
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Sync images to DockerHub
run: REGISTRY=${{ env.DOCKERHUB_REGISTRY }} REPO=${{ env.REPO }} THREAD=${{ env.THREAD }} make sync_image
# - name: Login to ALI_REGISTRY
# uses: docker/login-action@v2
# with:
# registry: ${{ env.ALI_REGISTRY }}
# username: ${{ secrets.ALI_REGISTRY_USERNAME }}
# password: ${{ secrets.ALI_REGISTRY_PASSWORD }}
# - name: Sync images to ALI_REGISTRY
# run: REGISTRY=${{ env.ALI_REGISTRY }} REPO=${{ env.REPO }} THREAD=${{ env.THREAD }} make sync_image