From c77c4fe992ed815279d1ab148829fa466c7c9fb8 Mon Sep 17 00:00:00 2001 From: Luis Montero Date: Mon, 31 Jul 2023 12:17:32 +0200 Subject: [PATCH] chore: add workflow to sync public and private repositories. This commit adds a workflow that force pushes the public repository state to the private repository on pushes to main. --- .github/workflows/sync_on_push.yaml | 31 +++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/sync_on_push.yaml diff --git a/.github/workflows/sync_on_push.yaml b/.github/workflows/sync_on_push.yaml new file mode 100644 index 000000000..2750b15a2 --- /dev/null +++ b/.github/workflows/sync_on_push.yaml @@ -0,0 +1,31 @@ +# Sync repos +name: Sync repos + +on: + push: + branches: + - 'main' + workflow_dispatch: + +jobs: + sync-repo: + if: ${{ github.repository == 'zama-ai/concrete-ml' }} + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + with: + fetch-depth: 0 + - name: Save repo + uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce + with: + name: repo-archive + path: '.' + - name: git-sync + uses: wei/git-sync@55c6b63b4f21607da0e9877ca9b4d11a29fc6d83 + with: + source_repo: "zama-ai/concrete-ml" + source_branch: "main" + destination_repo: "https://${{ secrets.BOT_USERNAME }}:${{ secrets.CONCRETE_ACTIONS_TOKEN }}@github.com/${{ secrets.SYNC_DEST_REPO }}" + destination_branch: "main" +