Skip to content

Commit

Permalink
sync/ci: Fix commit
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Northey <ryan@synca.io>
  • Loading branch information
phlax authored and update-envoy[bot] committed Jun 4, 2023
1 parent 678d460 commit afab748
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/envoy-sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Sync Envoy

on:
workflow_dispatch:
pull_request:

concurrency:
group: ${{ github.workflow }}
Expand Down
12 changes: 7 additions & 5 deletions ci/sync_envoy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ MIRROR_MSG="Mirrored from envoyproxy/envoy"
SRCS=(envoy contrib)
GO_TARGETS=(@envoy_api//...)
IMPORT_BASE="github.com/envoyproxy/go-control-plane"
COMMITTER_NAME="envoy-sync[bot]"
COMMITTER_EMAIL="envoy-sync[bot]@users.noreply.github.com"
COMMITTER_NAME="update-envoy[bot]"
COMMITTER_EMAIL="135279899+update-envoy[bot]@users.noreply.github.com"
ENVOY_SRC_DIR="${ENVOY_SRC_DIR:-}"


Expand Down Expand Up @@ -56,13 +56,15 @@ commit_changes () {
return
fi
last_envoy_sha="$(get_last_envoy_sha)"
echo "Latest Envoy SHA: ${last_envoy_sha}"
changes="$(git -C "${ENVOY_SRC_DIR}" rev-list "${last_envoy_sha}"..HEAD)"
echo "Changes detected: "
echo "$changes"
latest_commit="$(git -C "${ENVOY_SRC_DIR}" rev-list "${last_envoy_sha}"..HEAD | head -n1)"
latest_commit="$(git -C "${ENVOY_SRC_DIR}" rev-list HEAD -n1)"
echo "Latest commit: ${latest_commit}"
echo "$latest_commit" > envoy/COMMIT
git config --global user.email "$COMMITTER_EMAIL"
git config --global user.name "$COMMITTER_NAME"
git config user.email "$COMMITTER_EMAIL"
git config user.name "$COMMITTER_NAME"
git add envoy contrib
git commit --allow-empty -s -m "${MIRROR_MSG} @ ${latest_commit}"
git push origin main
Expand Down

0 comments on commit afab748

Please sign in to comment.