Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/titenkov/docker-sync-action

GitHub Action that syncs your docker images across registries ๐Ÿคนโ€โ™€๏ธ
https://github.com/titenkov/docker-sync-action

actions docker github github-actions

Last synced: 3 months ago
JSON representation

GitHub Action that syncs your docker images across registries ๐Ÿคนโ€โ™€๏ธ

Lists

README

        

# ๐Ÿณ Docker Sync Action

[![license](https://img.shields.io/badge/License-MIT-purple.svg)](LICENSE)
[![market](https://img.shields.io/badge/Get_it-on_the_Marketplace-informational.svg)](https://github.com/marketplace/actions/docker-sync-action)

This github action syncs your docker images across registries ๐Ÿคนโ€โ™€๏ธ

Schedule an automatic workflow, which will ensure that docker images from different registries (or repositories) are in sync. This github action is using [Skopeo](https://github.com/containers/skopeo) command line utility under the hood.

```yaml
- uses: titenkov/docker-sync-action@v1
with:
source: titenkov/notifir
destination: ghcr.io/notifir
destination-credentials: titenkov:${{ secrets.GH_TOKEN }}
```

## Usage

Here is an example of what to put in your `.github/workflows/sync-docker-images.yml` file to trigger the action.

```yaml
name: Sync Docker Images

on:
schedule:
- cron: "0 0 * * *" # Run every day

jobs:
sync:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Sync docker images
uses: titenkov/docker-sync-action@v1
with:
source: titenkov/notifir
destination: ghcr.io/notifir
destination-credentials: titenkov:${{ secrets.GH_TOKEN }}
```

In the example, the action will take all the images from `titenkov/notifir` repository and sync them to `ghcr.io/notifir`.

Another example for the case, when you want to sync only specific tags:

```yaml
- name: Sync docker images
uses: titenkov/docker-sync-action@v1
with:
source: titenkov/notifir
destination: ghcr.io/notifir/notifir
destination-credentials: titenkov:${{ secrets.GH_TOKEN }}
versions: |
0.1.9
0.1.10
latest
```

## Action inputs

Supported transport types: `containers-storage`, `dir`, `docker`, `docker-archive`, `docker-daemon`, `oci`, `oci-archive`, `ostree`, `tarball`.

| Name | Description | Required | Default |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------- | -------- | -------- |
| `source` | Your source image repository | true | - |
| `source-transport` | Your source transport type | false | 'docker' |
| `source-credentials` | Your source credentials (`user:password`) | false | 'null' |
| `source-tls` | Require HTTPS and verify certificates when talking to container registry or daemon | false | 'false' |
| `destination` | Your destination image repository | true | - |
| `destination-transport` | Your destination transport type | false | 'docker' |
| `destination-credentials` | Your destination credentials (`user:password`) | false | 'null' |
| `destination-tls` | Require HTTPS and verify certificates when talking to container registry or daemon | false | 'false' |
| `format ` | MANIFEST TYPE (oci, v2s1, or v2s2) to use in the destination (default is manifest type of source, with fallbacks) | false | 'v2s2' |
| `versions ` | Your docker image tags to sync (multi-line) | false | '' |

## Contact

I would love to hear your feedback! Tell me what you loved and what you want to improve about this action at โœ‰๏ธ [email protected], or feel free to open a Github Issue.