diff --git a/.github/workflows/cron-sync-bcny-forks.yml b/.github/workflows/cron-sync-bcny-forks.yml index 026f0f4..d089448 100644 --- a/.github/workflows/cron-sync-bcny-forks.yml +++ b/.github/workflows/cron-sync-bcny-forks.yml @@ -8,37 +8,54 @@ on: workflow_dispatch: jobs: + token: + runs-on: ubuntu-latest + outputs: + token: ${{ steps.token.outputs.token }} + steps: + - uses: actions/create-github-app-token@v1 + id: token + with: + app-id: ${{ secrets.FORK_SYNCER_APP_ID }} + private-key: ${{ secrets.FORK_SYNCER_PRIVATE_KEY }} + owner: ${{ github.repository_owner }} sync_analytics_swift: + needs: [token] name: "Sync thebrowsercompany/analytics-swift" runs-on: ubuntu-latest steps: - - uses: thebrowsercompany/gha-sync-fork@bd704c61db9000e8bbc1affe3d4199b7e3eb291c + - uses: thebrowsercompany/gha-sync-fork@73f382706ed07f29b97b055031e69e7beb6c1795 with: fork_repo: thebrowsercompany/analytics-swift fork_branch: develop upstream_repo: segmentio/analytics-swift upstream_branch: main + token: ${{ needs.token.outputs.token }} sync_firebase_cpp_sdk: + needs: [token] name: "Sync thebrowsercompany/firebase-cpp-sdk" runs-on: ubuntu-latest steps: - - uses: thebrowsercompany/gha-sync-fork@bd704c61db9000e8bbc1affe3d4199b7e3eb291c + - uses: thebrowsercompany/gha-sync-fork@73f382706ed07f29b97b055031e69e7beb6c1795 with: fork_repo: thebrowsercompany/firebase-cpp-sdk fork_branch: compnerd/swift upstream_repo: firebase/firebase-cpp-sdk upstream_branch: main + token: ${{ needs.token.outputs.token }} sync_swift_eventsource: + needs: [token] name: "Sync thebrowsercompany/swift-eventsource" runs-on: ubuntu-latest steps: - - uses: thebrowsercompany/gha-sync-fork@bd704c61db9000e8bbc1affe3d4199b7e3eb291c + - uses: thebrowsercompany/gha-sync-fork@73f382706ed07f29b97b055031e69e7beb6c1795 with: fork_repo: thebrowsercompany/swift-eventsource fork_branch: main-bcny upstream_repo: launchdarkly/swift-eventsource upstream_branch: main + token: ${{ needs.token.outputs.token }} diff --git a/action.yml b/action.yml index 0c6dffc..fefa891 100644 --- a/action.yml +++ b/action.yml @@ -29,6 +29,10 @@ inputs: required: false default: false + token: + description: Authentication token to use for Git commands + required: false + runs: using: composite steps: @@ -39,6 +43,7 @@ runs: # Fetch all commits from the fork to prevent arbitrary merge conflicts. fetch-depth: 0 path: ${{ github.workspace }}/fork + token: ${{ inputs.token || github.token }} - name: Rebase onto upstream shell: pwsh