Skip to content

chen-01 is Sync Images to DockerHub. #1

chen-01 is Sync Images to DockerHub.

chen-01 is Sync Images to DockerHub. #1

# 工作流名称
name: Sync-Images-to-DockerHub-Example
# 工作流运行时显示名称
run-name: ${{ github.actor }} is Sync Images to DockerHub.
# 怎样触发工作流
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# 工作流程任务(通常含有一个或多个步骤)
jobs:
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:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
logout: false
- name: Use Skopeo Tools Sync Image to Docker Hub
run: |
#!/usr/bin/env bash
skopeo copy docker://gcr.io/kaniko-project/executor:v1.13.0 docker://weiyigeek/kaniko-executor:v1.13.0