ci/sync: Use app to push changes (#629)

Signed-off-by: Ryan Northey <ryan@synca.io>
pull/630/head
phlax 2 years ago committed by GitHub
parent b7fbec0a65
commit da10da821d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      .github/workflows/envoy-sync.yaml
  2. 6
      ci/sync_envoy.sh

@ -21,15 +21,21 @@ jobs:
|| github.actor == 'sync-envoy[bot]' || github.actor == 'sync-envoy[bot]'
}} }}
steps: 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' - name: 'Checkout Repository'
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
ref: main ref: main
token: ${{ steps.appauth.outputs.value }}
fetch-depth: 0 fetch-depth: 0
# Checkout the Envoy repo # Checkout the Envoy repo
- name: 'Checkout Repository' - name: 'Checkout Envoy Repository'
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
repository: envoyproxy/envoy repository: envoyproxy/envoy
@ -41,3 +47,5 @@ jobs:
- run: ci/sync_envoy.sh - run: ci/sync_envoy.sh
env: env:
ENVOY_SRC_DIR: ../envoy ENVOY_SRC_DIR: ../envoy
GITHUB_EMAIL: "135279899+update-envoy[bot]@users.noreply.github.com"
GITHUB_NAME: "update-envoy[bot]"

@ -3,6 +3,9 @@
set -e set -e
API_MAIN_BRANCH="main" API_MAIN_BRANCH="main"
COMMITTER_NAME="${GITHUB_NAME:-}"
COMMITTER_EMAIL="${GITHUB_EMAIL:-}"
if [[ -z "$ENVOY_SRC_DIR" ]]; then if [[ -z "$ENVOY_SRC_DIR" ]]; then
echo "ENVOY_SRC_DIR not set, it should point to a cloned Envoy repo" >&2 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 exit 1
fi 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 # Determine last envoyproxy/envoy SHA in envoyproxy/data-plane-api
MIRROR_MSG="Mirrored from https://github.com/envoyproxy/envoy" MIRROR_MSG="Mirrored from https://github.com/envoyproxy/envoy"

Loading…
Cancel
Save