Skip to content

Commit aa8a163

Browse files
committed
use token_action to pull
1 parent ac15043 commit aa8a163

10 files changed

Lines changed: 54 additions & 15 deletions

.github/workflows/ci.yaml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ name: MatrixOne CI
44
on:
55
workflow_call:
66
secrets:
7+
TOKEN_ACTION:
8+
description: "Token for checkout (e.g. pull from fork/private)"
9+
required: false
710
S3ENDPOINT:
811
description: "S3ENDPOINT For Test"
912
required: true
@@ -76,6 +79,7 @@ jobs:
7679
7780
- uses: actions/checkout@v6
7881
with:
82+
token: ${{ secrets.TOKEN_ACTION }}
7983
fetch-depth: "3"
8084
repository: ${{ github.event.pull_request.head.repo.full_name }}
8185
ref: ${{ github.event.pull_request.head.ref }}
@@ -143,20 +147,6 @@ jobs:
143147
echo "steps.ut.conclusion: ${{ steps.ut.conclusion }}"
144148
echo "FAIL_UT_CASES=${fail_ut_cases}"
145149
echo "FAIL_UT_CASES=${fail_ut_cases}" >> $GITHUB_OUTPUT
146-
- name: Insert Failed UT Cases to MOC
147-
if: ${{ failure() }}
148-
uses: matrixorigin/CI/actions/fail-ut-case@main
149-
with:
150-
action_time: ${{ steps.time.outputs.ACTION_TIME }}
151-
ut_cases: ${{ steps.failed.outputs.FAIL_UT_CASES }}
152-
pr_link: ${{ github.event.pull_request.html_url }}
153-
action_link: ${{ steps.time.outputs.ACTION_LINK }}
154-
job_time: ${{ steps.time.outputs.START_TIME }}
155-
mo_host: ${{ secrets.EE_DB_ADDR }}
156-
mo_port: ${{ secrets.EE_DB_PORT }}
157-
mo_user: ${{ secrets.EE_DB_USER }}
158-
mo_password: ${{ secrets.EE_DB_PASSWORD }}
159-
mo_database: ${{ secrets.EE_DB_DB }}
160150
- name: Print the Top 10 Time-Consuming Tests
161151
if: ${{ always() }}
162152
continue-on-error: true
@@ -173,6 +163,7 @@ jobs:
173163
steps:
174164
- uses: actions/checkout@v6
175165
with:
166+
token: ${{ secrets.TOKEN_ACTION }}
176167
fetch-depth: "3"
177168
repository: ${{ github.event.pull_request.head.repo.full_name }}
178169
ref: ${{ github.event.pull_request.head.ref }}
@@ -211,6 +202,7 @@ jobs:
211202
steps:
212203
- uses: actions/checkout@v6
213204
with:
205+
token: ${{ secrets.TOKEN_ACTION }}
214206
fetch-depth: "3"
215207
repository: ${{ github.event.pull_request.head.repo.full_name }}
216208
ref: ${{ github.event.pull_request.head.ref }}

.github/workflows/e2e-compose.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: MatrixOne Compose Test
22

33
on:
44
workflow_call:
5+
secrets:
6+
TOKEN_ACTION:
7+
description: "Token for checkout (e.g. pull from fork/private)"
8+
required: false
59

610
jobs:
711
bvt-docker-compose-push:
@@ -24,6 +28,7 @@ jobs:
2428
- name: checkout
2529
uses: actions/checkout@v6
2630
with:
31+
token: ${{ secrets.TOKEN_ACTION }}
2732
fetch-depth: "3"
2833
repository: ${{ github.event.pull_request.head.repo.full_name }}
2934
ref: ${{ github.event.pull_request.head.ref }}
@@ -194,6 +199,7 @@ jobs:
194199
- name: checkout
195200
uses: actions/checkout@v6
196201
with:
202+
token: ${{ secrets.TOKEN_ACTION }}
197203
fetch-depth: "3"
198204
repository: ${{ github.event.pull_request.head.repo.full_name }}
199205
ref: ${{ github.event.pull_request.head.ref }}

.github/workflows/e2e-standalone.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: MatrixOne e2e CI(Standalone)
22

33
on:
44
workflow_call:
5+
secrets:
6+
TOKEN_ACTION:
7+
description: "Token for checkout (e.g. pull from fork/private)"
8+
required: false
59

610
jobs:
711
bvt-linux-x86:
@@ -14,6 +18,7 @@ jobs:
1418
- name: checkout head
1519
uses: actions/checkout@v6
1620
with:
21+
token: ${{ secrets.TOKEN_ACTION }}
1722
fetch-depth: "3"
1823
path: ./head
1924
repository: ${{ github.event.pull_request.head.repo.full_name }}
@@ -149,6 +154,7 @@ jobs:
149154
- name: checkout head
150155
uses: actions/checkout@v6
151156
with:
157+
token: ${{ secrets.TOKEN_ACTION }}
152158
path: ./head
153159
repository: ${{ github.event.pull_request.head.repo.full_name }}
154160
ref: ${{ github.event.pull_request.head.ref }}
@@ -237,6 +243,7 @@ jobs:
237243
- name: checkout head
238244
uses: actions/checkout@v6
239245
with:
246+
token: ${{ secrets.TOKEN_ACTION }}
240247
fetch-depth: "3"
241248
path: ./head
242249
repository: ${{ github.event.pull_request.head.repo.full_name }}

.github/workflows/e2e-upgrade.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: MatrixOne e2e upgrade CI
22

33
on:
44
workflow_call:
5+
secrets:
6+
TOKEN_ACTION:
7+
description: "Token for checkout (e.g. pull from fork/private)"
8+
required: false
59
inputs:
610
release-repo:
711
description: "release version"
@@ -23,13 +27,15 @@ jobs:
2327
- name: checkout head
2428
uses: actions/checkout@v6
2529
with:
30+
token: ${{ secrets.TOKEN_ACTION }}
2631
path: ./head
2732
repository: ${{ github.event.pull_request.head.repo.full_name }}
2833
ref: ${{ github.event.pull_request.head.ref }}
2934

3035
- name: checkout upstream
3136
uses: actions/checkout@v6
3237
with:
38+
token: ${{ secrets.TOKEN_ACTION }}
3339
path: ./upstream
3440
repository: ${{ github.event.pull_request.base.repo.full_name }}
3541
ref: ${{ github.event.pull_request.base.ref }}
@@ -229,6 +235,7 @@ jobs:
229235
- name: Checkout Head
230236
uses: actions/checkout@v6
231237
with:
238+
token: ${{ secrets.TOKEN_ACTION }}
232239
path: ./head
233240
repository: ${{ github.event.pull_request.head.repo.full_name }}
234241
ref: ${{ github.event.pull_request.head.ref }}
@@ -243,6 +250,7 @@ jobs:
243250
- name: Checkout Upstream Release
244251
uses: actions/checkout@v6
245252
with:
253+
token: ${{ secrets.TOKEN_ACTION }}
246254
path: ./upstream
247255
repository: ${{ inputs.release-repo }}
248256
# ref: ${{ steps.get-latest-release.outputs.tag }} // restore to this line after new release includes d4051aebd6 - update bvt cases (#23317)

.github/workflows/image-build.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ on:
1919
default: "p4n7f8j9"
2020
type: string
2121
secrets:
22+
TOKEN_ACTION:
23+
description: "Token for checkout (e.g. pull from fork/private)"
24+
required: false
2225
DOCKERHUB_USERNAME:
2326
description: 'DOCKERHUB_USERNAME'
2427
required: true
@@ -48,6 +51,7 @@ jobs:
4851
- name: Checkout
4952
uses: actions/checkout@v6
5053
with:
54+
token: ${{ secrets.TOKEN_ACTION }}
5155
fetch-depth: 1
5256

5357
# # github OIDC https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services

.github/workflows/merge-trigger-standalone.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: MO Checkin Regression(Standalone BVT)
33
on:
44
workflow_call:
55
secrets:
6+
TOKEN_ACTION:
7+
description: "Token for checkout (e.g. pull from fork/private)"
8+
required: false
69
WECHAT_MO_CHECKIN_BOT_WEBHOOK:
710
description: "WECHAT_MO_CHECKIN_BOT_WEBHOOK"
811
required: true
@@ -20,6 +23,7 @@ jobs:
2023
- name: checkout matrixorigin/matrixone
2124
uses: actions/checkout@v6
2225
with:
26+
token: ${{ secrets.TOKEN_ACTION }}
2327
path: ./matrixone
2428
- name: Set up Go
2529
uses: matrixorigin/CI/actions/setup-env@main
@@ -133,6 +137,7 @@ jobs:
133137
- name: checkout head
134138
uses: actions/checkout@v6
135139
with:
140+
token: ${{ secrets.TOKEN_ACTION }}
136141
path: ./head
137142
- name: Set up Go
138143
uses: matrixorigin/CI/actions/setup-env@main

.github/workflows/merge-trigger-tke.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ jobs:
4343
if: ${{ always() && !cancelled() }}
4444
uses: actions/checkout@v6
4545
with:
46+
token: ${{ secrets.TOKEN_ACTION }}
4647
path: ./matrixone
4748
- name: Login to TCR
4849
uses: docker/login-action@v3
@@ -125,6 +126,7 @@ jobs:
125126
if: ${{ always() && !cancelled() }}
126127
uses: actions/checkout@v6
127128
with:
129+
token: ${{ secrets.TOKEN_ACTION }}
128130
path: ./matrixone
129131
- name: Clean TKE ENV
130132
run: |
@@ -285,13 +287,13 @@ jobs:
285287
uses: actions/checkout@v6
286288
with:
287289
repository: matrixorigin/mo-tester
288-
token: ${{secrets.TOKEN_ACTION}}
289290
path: ./mo-tester
290291
ref: main
291292
- name: Clone matrixone Repo
292293
if: ${{ always() && !cancelled() }}
293294
uses: actions/checkout@v6
294295
with:
296+
token: ${{ secrets.TOKEN_ACTION }}
295297
path: ./matrixone
296298
- name: Set JAVA PATH
297299
run: |

.github/workflows/release.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ jobs:
3535
steps:
3636
- name: Checkout source
3737
uses: actions/checkout@v6
38+
with:
39+
token: ${{ secrets.TOKEN_ACTION }}
3840
- name: Get release
3941
id: get_release
4042
uses: bruceadams/get-release@v1.3.2
@@ -101,6 +103,8 @@ jobs:
101103
steps:
102104
- name: Checkout source
103105
uses: actions/checkout@v6
106+
with:
107+
token: ${{ secrets.TOKEN_ACTION }}
104108
- name: Get release
105109
id: get_release
106110
uses: bruceadams/get-release@v1.3.2
@@ -168,6 +172,8 @@ jobs:
168172
exit 1;
169173
- name: Checkout source
170174
uses: actions/checkout@v6
175+
with:
176+
token: ${{ secrets.TOKEN_ACTION }}
171177
- name: Get release
172178
id: get_release
173179
uses: bruceadams/get-release@v1.3.2
@@ -197,6 +203,7 @@ jobs:
197203
- name: Clone gon
198204
uses: actions/checkout@v6
199205
with:
206+
token: ${{ secrets.TOKEN_ACTION }}
200207
fetch-depth: "1"
201208
repository: matrixorigin/gon
202209
ref: master
@@ -270,6 +277,8 @@ jobs:
270277
exit 1;
271278
- name: Checkout source
272279
uses: actions/checkout@v6
280+
with:
281+
token: ${{ secrets.TOKEN_ACTION }}
273282
- name: Get release
274283
id: get_release
275284
uses: bruceadams/get-release@v1.3.2

.github/workflows/robot.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ jobs:
3838
steps:
3939
- name: CheckOut
4040
uses: actions/checkout@v6
41+
with:
42+
token: ${{ secrets.TOKEN_ACTION }}
4143

4244
- name: Check the code to see if the issue number is removed
4345
id: get_check_val
@@ -102,6 +104,7 @@ jobs:
102104
steps:
103105
- uses: actions/checkout@v6
104106
with:
107+
token: ${{ secrets.TOKEN_ACTION }}
105108
fetch-depth: "3"
106109
path: ./matrixone
107110
- name: Set up Go

.github/workflows/utils.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ jobs:
9898
steps:
9999
- uses: actions/checkout@v6
100100
with:
101+
token: ${{ secrets.TOKEN_ACTION }}
101102
fetch-depth: "1"
102103
path: ./matrixone
103104
repository: ${{ github.event.pull_request.head.repo.full_name }}
@@ -330,6 +331,7 @@ jobs:
330331
if: ${{ always() && !cancelled() }}
331332
uses: actions/checkout@v6
332333
with:
334+
token: ${{ secrets.TOKEN_ACTION }}
333335
repository: matrixorigin/CI
334336
fetch-depth: "1"
335337
path: CI
@@ -426,6 +428,7 @@ jobs:
426428
steps:
427429
- uses: actions/checkout@v6
428430
with:
431+
token: ${{ secrets.TOKEN_ACTION }}
429432
path: ./matrixone
430433
repository: ${{ github.event.pull_request.head.repo.full_name }}
431434
ref: ${{ github.event.pull_request.head.ref }}

0 commit comments

Comments
 (0)