-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #264 from tedjpoole/scheduled-sync-from-upstream
Sync from upstream on a timed schedule
- Loading branch information
Showing
3 changed files
with
96 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,13 @@ | ||
name: Sync from Envoy | ||
# This workflow is invoked from the envoy-sync.yaml workflow in the upstream | ||
# envoy repository. Each time there is a push to one of the branches listed in | ||
# the upstream envoy-sync.yaml workflow, this workflow will be invoked, with the | ||
# branch name passed as an input. | ||
|
||
# Currently this workflow does nothing because we currently sync from upstream | ||
# envoy on a regular timed schedule via the envoy-sync-scheduled.yaml workflow, | ||
# instead of being triggered on every upstream push. | ||
|
||
name: Sync from Upstream (Pushed) | ||
|
||
permissions: | ||
contents: read | ||
|
@@ -18,27 +27,4 @@ concurrency: | |
jobs: | ||
sync: | ||
runs-on: ubuntu-22.04 | ||
if: | | ||
${{ | ||
!contains(github.actor, '[bot]') | ||
|| github.actor == 'update-openssl-envoy[bot]' | ||
}} | ||
steps: | ||
- id: appauth | ||
uses: envoyproxy/toolshed/gh-actions/[email protected] | ||
with: | ||
key: ${{ secrets.ENVOY_CI_UPDATE_BOT_KEY }} | ||
app_id: ${{ secrets.ENVOY_CI_UPDATE_APP_ID }} | ||
- name: "Checkout ${{ github.repository }}[${{ github.event.inputs.branch }}]" | ||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | ||
with: | ||
ref: ${{ github.event.inputs.branch }} | ||
token: ${{ steps.appauth.outputs.token }} | ||
fetch-depth: 0 | ||
- name: "Set git user details" | ||
run: | | ||
git config user.name "${{ github.actor }}" | ||
git config user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com" | ||
- run: ci/envoy-sync-receive.sh ${{ github.event.inputs.branch }} | ||
env: | ||
GH_TOKEN: ${{ steps.appauth.outputs.token }} | ||
if: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Sync from Upstream (Scheduled) | ||
|
||
permissions: | ||
contents: read | ||
|
||
on: | ||
schedule: | ||
- cron: "0 1 * * *" | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }} | ||
|
||
jobs: | ||
sync: | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
branch_name: | ||
- main | ||
- release/v1.31 | ||
- release/v1.28 | ||
steps: | ||
- id: appauth | ||
uses: envoyproxy/toolshed/gh-actions/[email protected] | ||
with: | ||
key: ${{ secrets.ENVOY_CI_UPDATE_BOT_KEY }} | ||
app_id: ${{ secrets.ENVOY_CI_UPDATE_APP_ID }} | ||
|
||
# Checkout the branch we're merging into | ||
- name: "Checkout ${{ github.repository }}[${{ matrix.branch_name }}]" | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ steps.appauth.outputs.token }} | ||
ref: ${{ matrix.branch_name }} | ||
fetch-depth: 0 | ||
|
||
# Configure the git user info on the repository | ||
- run: git config user.name "${{ github.actor }}" | ||
- run: git config user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com" | ||
|
||
# Checkout & run the script from the default branch | ||
- name: 'Checkout ci/envoy-sync-receive.sh' | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.repository.default_branch }} | ||
sparse-checkout: 'ci/envoy-sync-receive.sh' | ||
sparse-checkout-cone-mode: false | ||
path: '.script' | ||
- run: .script/ci/envoy-sync-receive.sh ${{ matrix.branch_name }} | ||
env: | ||
GH_TOKEN: ${{ steps.appauth.outputs.token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters