File tree Expand file tree Collapse file tree 4 files changed +56
-35
lines changed Expand file tree Collapse file tree 4 files changed +56
-35
lines changed Original file line number Diff line number Diff line change 1+ name : CI/sync
2+
3+ on :
4+ workflow_call :
5+ secrets :
6+ app-id :
7+ app-key :
8+ inputs :
9+ sync :
10+ type : boolean
11+ default : true
12+
13+ jobs :
14+ sync :
15+ runs-on : ubuntu-22.04
16+ steps :
17+ - id : appauth
18+ if : ${{ inputs.sync }}
19+ uses :
envoyproxy/toolshed/gh-actions/[email protected] 20+ with :
21+ key : ${{ secrets.app-key }}
22+ app_id : ${{ secrets.app-id }}
23+ - name : ' Checkout go-control-plane repository'
24+ uses : actions/checkout@v4
25+ with :
26+ path : go-control-plane
27+ fetch-depth : ${{ ! inputs.sync && 1 || 0 }}
28+ token : ${{ steps.appauth.outputs.token || secrets.GITHUB_TOKEN }}
29+ - name : ' Checkout Envoy repository'
30+ uses : actions/checkout@v4
31+ with :
32+ repository : envoyproxy/envoy
33+ fetch-depth : ${{ ! inputs.sync && 1 || 0 }}
34+ path : envoy
35+ - run : ci/sync_envoy.sh
36+ env :
37+ ENVOY_SRC_DIR : ../envoy
38+ NO_COMMIT_CHANGES : ${{ ! inputs.sync && '1' || '' }}
39+ working-directory : go-control-plane
Original file line number Diff line number Diff line change 88
99jobs :
1010 build :
11- runs-on : ubuntu-latest
11+ runs-on : ubuntu-22.04
1212 steps :
1313 - uses : actions/checkout@v4
1414 - name : build and test
15- run : make docker_tests
15+ run : make docker_tests
16+
17+ sync :
18+ uses : ./.github/workflows/_sync.yml
19+ with :
20+ sync : false
Original file line number Diff line number Diff line change 11name : Sync Envoy
22
3+ permissions :
4+ contents : read
5+
36on :
47 workflow_dispatch :
58
69concurrency :
710 group : ${{ github.workflow }}
811 cancel-in-progress : true
912
10- permissions :
11- contents : read
1213
1314jobs :
1415 sync :
1516 runs-on : ubuntu-22.04
16- permissions :
17- contents : write
1817 if : |
1918 ${{
2019 !contains(github.actor, '[bot]')
2120 || github.actor == 'sync-envoy[bot]'
2221 }}
23- steps :
24- - id : appauth
25- uses :
envoyproxy/toolshed/gh-actions/[email protected] 26- with :
27- key : ${{ secrets.ENVOY_CI_UPDATE_BOT_KEY }}
28- app_id : ${{ secrets.ENVOY_CI_UPDATE_APP_ID }}
29-
30- # Checkout the repo
31- - name : ' Checkout Repository'
32- uses : actions/checkout@v4
33- with :
34- ref : main
35- fetch-depth : 0
36- token : ${{ steps.appauth.outputs.token }}
37-
38- # Checkout the Envoy repo
39- - name : ' Checkout Repository'
40- uses : actions/checkout@v4
41- with :
42- repository : envoyproxy/envoy
43- ref : main
44- fetch-depth : 0
45- path : upstream
46-
47- - run : mv upstream ../envoy
48- - run : ci/sync_envoy.sh
49- env :
50- ENVOY_SRC_DIR : ../envoy
22+ uses : ./.github/workflows/_sync.yml
23+ secrets :
24+ app-id : ${{ secrets.ENVOY_CI_UPDATE_APP_ID }}
25+ app-key : ${{ secrets.ENVOY_CI_UPDATE_BOT_KEY }}
Original file line number Diff line number Diff line change @@ -73,4 +73,6 @@ commit_changes () {
7373
7474build_protos
7575sync_protos
76- commit_changes
76+ if [[ -z " $NO_COMMIT_CHANGES " ]]; then
77+ commit_changes
78+ fi
You can’t perform that action at this time.
0 commit comments