From 5f8c3e7c6a9e27e1dff4b5539f28b936cb539494 Mon Sep 17 00:00:00 2001 From: Francois Ferrand Date: Tue, 9 Apr 2024 17:28:29 +0200 Subject: [PATCH] Add registry migration workflow Issue: PTFE-1339 --- .github/workflows/migrate.yaml | 49 ++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/migrate.yaml diff --git a/.github/workflows/migrate.yaml b/.github/workflows/migrate.yaml new file mode 100644 index 0000000000..a7868777fc --- /dev/null +++ b/.github/workflows/migrate.yaml @@ -0,0 +1,49 @@ +--- +name: migrate + +on: + push: + branches-ignore: + - development/** + - q/*/** + +jobs: + build: + runs-on: ubuntu-latest + steps: + + - name: Sync ${{ github.event.repository.name }} + run: | + docker run --rm quay.io/skopeo/stable:v1.15.0 sync \ + --src docker --dest docker --all --preserve-digests --retry-times 5 \ + --src-creds ${{ secrets.REGISTRY_LOGIN }}:${{ secrets.REGISTRY_PASSWORD }} \ + --dest-creds ${{ github.repository_owner }}:${{ github.token }} \ + registry.scality.com/${{ github.event.repository.name }}/${{ github.event.repository.name }} \ + ghcr.io/scality/ + + - name: Sync ${{ github.event.repository.name }}-dashboards + run: | + docker run --rm quay.io/skopeo/stable:v1.15.0 sync \ + --src docker --dest docker --all --preserve-digests --retry-times 5 \ + --src-creds ${{ secrets.REGISTRY_LOGIN }}:${{ secrets.REGISTRY_PASSWORD }} \ + --dest-creds ${{ github.repository_owner }}:${{ github.token }} \ + registry.scality.com/${{ github.event.repository.name }}/${{ github.event.repository.name }}-dashboards \ + ghcr.io/scality/${{ github.event.repository.name }} + + - name: Sync ${{ github.event.repository.name }}-policices + run: | + docker run --rm quay.io/skopeo/stable:v1.15.0 sync \ + --src docker --dest docker --all --preserve-digests --retry-times 5 \ + --src-creds ${{ secrets.REGISTRY_LOGIN }}:${{ secrets.REGISTRY_PASSWORD }} \ + --dest-creds ${{ github.repository_owner }}:${{ github.token }} \ + registry.scality.com/${{ github.event.repository.name }}/${{ github.event.repository.name }}-policies \ + ghcr.io/scality/${{ github.event.repository.name }} + + - name: Sync pykmip + run: | + docker run --rm quay.io/skopeo/stable:v1.15.0 sync \ + --src docker --dest docker --all --preserve-digests --retry-times 5 \ + --src-creds ${{ secrets.REGISTRY_LOGIN }}:${{ secrets.REGISTRY_PASSWORD }} \ + --dest-creds ${{ github.repository_owner }}:${{ github.token }} \ + registry.scality.com/${{ github.event.repository.name }}/pykmip \ + ghcr.io/scality/${{ github.event.repository.name }}