shaohean is Sync Images to DockerHub. #118
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
# This is a basic workflow to help you get started with Actions | |
name: CI | |
run-name: ${{ github.actor }} is Sync Images to DockerHub. | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the "main" branch | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "syncimages" | |
syncimages: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repos | |
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-hangzhou.aliyuncs.com | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
logout: false | |
- name: buildx | |
uses: docker/build-push-action@v2 | |
with: | |
file: ./Dockerfile | |
push: true | |
tags: registry.cn-hangzhou.aliyuncs.com/soft24/gxh:v1.0.0 | |
platforms: linux/arm64 | |
# Runs a set of commands using the runners shell | |
# 使用shell命令批量同步所需的镜像到dockerHub中 | |
#- name: Use Skopeo Tools Sync Image to Docker Hub | |
# run: | | |
# #!/usr/bin/env bash | |
# skopeo copy --all docker://docker.elastic.co/elasticsearch/elasticsearch:7.17.9 docker://registry.cn-hangzhou.aliyuncs.com/soft24/elasticsearch:7.17.9 | |
# skopeo copy --all docker://docker.elastic.co/logstash/logstash:7.17.9 docker://registry.cn-hangzhou.aliyuncs.com/soft24/logstash:7.17.9 | |
# skopeo copy --all docker://docker.elastic.co/kibana/kibana:7.17.9 docker://registry.cn-hangzhou.aliyuncs.com/soft24/kibana:7.17.9 | |
# skopeo copy --all docker://docker.io/library/gcc:12.4 docker://registry.cn-hangzhou.aliyuncs.com/soft24/gcc:12.4 |