-
Notifications
You must be signed in to change notification settings - Fork 4.9k
41 lines (36 loc) · 1.17 KB
/
sync-minikube.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
name: Sync docker images of minikube to Alibaba Cloud
on:
workflow_dispatch:
schedule:
# every day at 7am & 7pm pacific
- cron: "0 2,14 * * *"
env:
GOPROXY: https://proxy.golang.org
GO_VERSION: '1.21.1'
permissions:
contents: read
jobs:
sync-images:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./image-syncer
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
with:
repository: denverdino/image-syncer
path: ./image-syncer
- name: Set up Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe
with:
go-version: ${{env.GO_VERSION}}
cache-dependency-path: ./go.sum
- name: Build
run: make
- name: Synchronize images to Alibaba Cloud Container Registry Service
env:
ACR_USER: ${{ secrets.ALIBABA_CLOUD_ACR_USER }}
ACR_PASSWORD: ${{ secrets.ALIBABA_CLOUD_ACR_PASSWORD }}
DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }}
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}
run: ./image-syncer --auth=auth.json --images=images.json --days=2 --proc=2