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 command line utility under the hood.
- uses: titenkov/docker-sync-action@v1
with:
source: titenkov/notifir
destination: ghcr.io/notifir
destination-credentials: titenkov:${{ secrets.GH_TOKEN }}
Here is an example of what to put in your .github/workflows/sync-docker-images.yml
file to trigger the action.
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:
- 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
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 | '' |
I would love to hear your feedback! Tell me what you loved and what you want to improve about this action at ✉️ feedback@titenkov.com, or feel free to open a Github Issue.