diff --git a/.github/workflows/envoy-sync.yaml b/.github/workflows/envoy-sync.yaml index 8b04690a..3c94cd75 100644 --- a/.github/workflows/envoy-sync.yaml +++ b/.github/workflows/envoy-sync.yaml @@ -21,15 +21,21 @@ jobs: || github.actor == 'sync-envoy[bot]' }} steps: - # Checkout the repo + - id: appauth + uses: envoyproxy/toolshed/gh-actions/appauth@actions-v0 + with: + key: ${{ secrets.ENVOY_CI_UPDATE_BOT_KEY }} + app_id: ${{ secrets.ENVOY_CI_UPDATE_APP_ID }} + - name: 'Checkout Repository' uses: actions/checkout@v3 with: ref: main + token: ${{ steps.appauth.outputs.value }} fetch-depth: 0 # Checkout the Envoy repo - - name: 'Checkout Repository' + - name: 'Checkout Envoy Repository' uses: actions/checkout@v3 with: repository: envoyproxy/envoy @@ -41,3 +47,5 @@ jobs: - run: ci/sync_envoy.sh env: ENVOY_SRC_DIR: ../envoy + GITHUB_EMAIL: "135279899+update-envoy[bot]@users.noreply.github.com" + GITHUB_NAME: "update-envoy[bot]" diff --git a/ci/sync_envoy.sh b/ci/sync_envoy.sh index 080dbd32..a3ef6c2b 100755 --- a/ci/sync_envoy.sh +++ b/ci/sync_envoy.sh @@ -3,6 +3,9 @@ set -e API_MAIN_BRANCH="main" +COMMITTER_NAME="${GITHUB_NAME:-}" +COMMITTER_EMAIL="${GITHUB_EMAIL:-}" + if [[ -z "$ENVOY_SRC_DIR" ]]; then echo "ENVOY_SRC_DIR not set, it should point to a cloned Envoy repo" >&2 @@ -12,6 +15,9 @@ elif [[ ! -e "$ENVOY_SRC_DIR" ]]; then exit 1 fi +git config --global user.email "$COMMITTER_EMAIL" +git config --global user.name "$COMMITTER_NAME" + # Determine last envoyproxy/envoy SHA in envoyproxy/data-plane-api MIRROR_MSG="Mirrored from https://github.com/envoyproxy/envoy"