diff --git a/.github/workflows/sync-from-aptos-core.yaml b/.github/workflows/sync-from-aptos-core.yaml index 08bfb33f0..dec6bd09e 100644 --- a/.github/workflows/sync-from-aptos-core.yaml +++ b/.github/workflows/sync-from-aptos-core.yaml @@ -1,6 +1,7 @@ name: Sync from aptos-core on: + pull_request: workflow_dispatch: permissions: @@ -8,7 +9,7 @@ permissions: id-token: write # env: - # GH_TOKEN: ${{ github.token }} +# GH_TOKEN: ${{ github.token }} jobs: sync: @@ -27,7 +28,7 @@ jobs: /usr/bin/git config --global --add url."https://${{ secrets.APTOS_BOT_CLONE_GH_PAT }}:x-oauth-basic@github".insteadOf ssh://git@github /usr/bin/git config --global --add url."https://${{ secrets.APTOS_BOT_CLONE_GH_PAT }}:x-oauth-basic@github".insteadOf https://github /usr/bin/git config --global --add url."https://${{ secrets.APTOS_BOT_CLONE_GH_PAT }}:x-oauth-basic@github".insteadOf git@github - + - uses: bazel-contrib/setup-bazel@0.8.5 with: # Avoid downloading Bazel every time. @@ -58,15 +59,15 @@ jobs: chmod +x /usr/local/bin/copybara - - name: Checkout aptos-framework - uses: actions/checkout@v4 - with: - path: aptos-framework - - name: Sync all branches - working-directory: aptos-framework + env: + GH_TOKEN: ${{ secrets.APTOS_BOT_CLONE_GH_PAT }} run: | - set -x - PATH=$PATH:/usr/local/bin/ - ./sync.sh + set -ex + + gh auth setup-git + gh repo clone aptos-labs/aptos-framework + + PATH=$PATH:/usr/local/bin/ + ./aptos-framework/sync.sh diff --git a/sync.sh b/sync.sh index 5175f08c0..baa21aa9f 100755 --- a/sync.sh +++ b/sync.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -ex SOURCE_REPO_URL="https://github.com/aptos-labs/aptos-core.git" DESTINATION_REPO_URL="https://github.com/aptos-labs/aptos-framework.git"