From a4fb2a90d57b8de919458473367d61e373f06c33 Mon Sep 17 00:00:00 2001 From: Rodrigo Lazo Paz Date: Tue, 3 Dec 2024 17:32:03 -0500 Subject: [PATCH 1/2] Make repo sync a pull operation The action was defined as a push operation before --- .github/workflows/private-mirror-sync.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/private-mirror-sync.yml b/.github/workflows/private-mirror-sync.yml index 60ac81ae93a..16f707c70e4 100644 --- a/.github/workflows/private-mirror-sync.yml +++ b/.github/workflows/private-mirror-sync.yml @@ -1,19 +1,22 @@ name: Private Mirror Sync -concurrency: - group: ${{ github.workflow }} - cancel-in-progress: true - on: - push: - branches: - - main + workflow_dispatch: + schedule: + - cron: '0 2 * * *' jobs: sync: - if: github.repository == 'firebase/firebase-android-sdk' + if: github.repository == 'FirebasePrivate/firebase-android-sdk' runs-on: ubuntu-latest steps: + - uses: actions/checkout@v4.1.1 + with: + repository: firebase/firebase-android-sdk + ref: main + fetch-depth: 0 + submodules: true + - uses: actions/checkout@v4.1.1 with: fetch-depth: 0 From 3f2b64656b684c33671e648ea264de1514e73a84 Mon Sep 17 00:00:00 2001 From: Rodrigo Lazo Paz Date: Tue, 3 Dec 2024 17:52:07 -0500 Subject: [PATCH 2/2] Add missing command --- .github/workflows/private-mirror-sync.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/private-mirror-sync.yml b/.github/workflows/private-mirror-sync.yml index 16f707c70e4..324993eb791 100644 --- a/.github/workflows/private-mirror-sync.yml +++ b/.github/workflows/private-mirror-sync.yml @@ -22,8 +22,9 @@ jobs: fetch-depth: 0 submodules: true token: ${{ secrets.GOOGLE_OSS_BOT_TOKEN }} - committer: google-oss-bot - name: Force push HEAD to private repo main branch run: | + git config --local user.name google-oss-bot + git config --local user.email firebase-oss-bot@google.com git remote add mirror https://github.com/FirebasePrivate/firebase-android-sdk.git git push mirror HEAD:main --force --verbose