From 6892e5779ee251c44bbce3e9cf1908ebbc32b6fe 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 | 40 ++++++++++++++++++++++++++++++++++ 1 file changed, 40 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..2cb417fbda --- /dev/null +++ b/.github/workflows/migrate.yaml @@ -0,0 +1,40 @@ +--- +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 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 }}-dev/pykmip \ + ghcr.io/scality/${{ github.event.repository.name }}