Skip to content
play

GitHub Action

Image Sync Action

v1 Latest version

Image Sync Action

play

Image Sync Action

Automatically sync conatiner images between registries through Github Action

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Image Sync Action

uses: hhyasdf/image-sync-action@v1

Learn more about this action in hhyasdf/image-sync-action

Choose a version

Image Sync Action

  • Use image-syncer to sync images between docker registries.

How to use

Typical Use Case

- name: Checkout
  uses: actions/checkout@v3
- uses: hhyasdf/image-sync-action@v1.1
  with:
    auth_file: ./auth.yaml # The auth information file of registries, optional.
    images_file: ./images.yaml # The images file descirbes which images need to sync, always needed.
    version: latest # The version of image-syncer, use the latest version if not specified.
    proc: 6 # The max number of goroutines to sync images, default value is 5.
  env:
    TEST_PASSWORD: ${{ secrets.TEST_PASSWORD }} # For safty consideration, passing registry password by github action secrets is needed.

To use the TEST_PASSWORD environment variable as a password, the auth file needs to include something like:

registry.cn-beijing.aliyuncs.com:
  username: test
  password: ${TEST_PASSWORD}

For more information of how to create an auth file or images file, refer to the image-syncer configure files.

Example

image-sync-action-example