Sync docker images of minikube to Alibaba Cloud #384
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.20.4' | |
permissions: | |
contents: read | |
jobs: | |
sync-images: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./image-syncer | |
steps: | |
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab | |
with: | |
repository: denverdino/image-syncer | |
path: ./image-syncer | |
- name: Set up Go | |
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 | |
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 |