Skip to main content

Container Images Sync Client

Project description

Container Images Sync

PyPI-python3-cisctl

Github Actions for Container Images Sync

How to Use by Github Actions

    - name: Container Images Sync
      uses: x-actions/python3-cisctl@v1.0.0
      env:
        GIT_ORG: "x-mirrors"
        GIT_REPO: "gcr.io"
        GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        SRC_IMAGE_LIST_URL: "https://raw.githubusercontent.com/x-mirrors/gcr.io/main/k8s.txt"
        DEST_REPO: "docker.io/gcmirrors"
        SRC_TRANSPORT: "docker"
        DEST_TRANSPORT: "docker"
        DEST_TRANSPORT_USER: "user"
        DEST_TRANSPORT_PASSWORD: "password"

Environment Variables:

  • GIT_ORG: github org
  • GIT_REPO: github repo
  • GIT_TOKEN: github token
  • SRC_IMAGE_LIST_URL: SRC_IMAGE_LIST_URL, default: "https://raw.githubusercontent.com/x-mirrors/gcr.io/main/k8s.txt"
  • DEST_REPO: DEST register REPO
  • SRC_TRANSPORT: SRC TRANSPORT
  • DEST_TRANSPORT: DEST TRANSPORT
  • DEST_TRANSPORT_USER: user
  • DEST_TRANSPORT_PASSWORD: "password"
  • THREAD_POOL_NUM: sync thread pool num

Dev and Test

  • local run
# install
pip3 install -r requirements.txt
python3 setup.py install
# or
pip3 install python3-cisctl

# set env
export GIT_ORG="x-mirrors"
export GIT_REPO="gcr.io"
export GIT_TOKEN='${{ secrets.GITHUB_TOKEN }}'
export SRC_IMAGE_LIST_URL="https://raw.githubusercontent.com/x-mirrors/gcr.io/main/k8s.txt"
export DEST_REPO="docker.io/gcmirrors"
export SRC_TRANSPORT="docker"
export DEST_TRANSPORT="docker"
export DEST_TRANSPORT_USER="xianbinxie"
export DEST_TRANSPORT_PASSWORD="<passwords>"

# run sync
cisctl
  • tests
python3 -m unittest cisctl.tests.unit.test_skopeo.SkopeoTestCase.test_do_sync

ref

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python3-cisctl-0.1.0.tar.gz (18.9 kB view hashes)

Uploaded Source

Built Distribution

python3_cisctl-0.1.0-py3-none-any.whl (28.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page