@@ -89,10 +89,20 @@ jobs:
89
89
DD_ENV=ci npx @datadog/[email protected] junit upload --tags test.type:deploy --service nextjs ./test/test-junit-report
90
90
fi
91
91
92
- front- sync :
92
+ sync-repositories :
93
93
needs : test-deploy
94
94
if : ${{ always() && github.repository_owner == 'vercel' && github.event_name == 'release' }}
95
95
runs-on : ubuntu-latest
96
+ strategy :
97
+ fail-fast : false
98
+ matrix :
99
+ include :
100
+ - repo : front
101
+ workflow_id : cron-update-next.yml
102
+ workflow_url : https://github.com/vercel/front/actions/workflows/cron-update-next.yml?query=event%3Aworkflow_dispatch
103
+ - repo : v0
104
+ workflow_id : update-next.yml
105
+ workflow_url : https://github.com/vercel/v0/actions/workflows/update-next.yml?query=event%3Aworkflow_dispatch
96
106
steps :
97
107
- uses : actions/checkout@v4
98
108
- id : nextPackageInfo
@@ -128,8 +138,8 @@ jobs:
128
138
"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}",
129
139
{
130
140
owner: "vercel",
131
- repo: "front ",
132
- workflow_id: "cron-update-next.yml ",
141
+ repo: "${{ matrix.repo }} ",
142
+ workflow_id: "${{ matrix.workflow_id }} ",
133
143
}
134
144
);
135
145
@@ -143,16 +153,16 @@ jobs:
143
153
return 'false';
144
154
}
145
155
- uses : actions/github-script@v7
146
- name : Trigger vercel/front sync
147
- id : trigger-front- sync
156
+ name : Trigger vercel/${{ matrix.repo }} sync
157
+ id : trigger-sync
148
158
if : steps.check-workflow-enabled.outputs.result == 'true'
149
159
with :
150
160
retries : 3
151
161
retry-exempt-status-codes : 400,401,404
152
162
# Default github token cannot dispatch events to the remote repo, it should be
153
163
# a PAT with Actions write access (https://docs.github.com/en/rest/actions/workflows?apiVersion=2022-11-28#create-a-workflow-dispatch-event)
154
164
github-token : ${{ secrets.GH_UPDATE_NEXT_WORKFLOW_TRIGGER }}
155
- # Note `workflow_id` and `inputs` are contract between vercel/front ,
165
+ # Note `workflow_id` and `inputs` are contract between vercel/${{ matrix.repo }} ,
156
166
# if these need to be changed both side should be updated accordingly.
157
167
script : |
158
168
const immediatelyClose = '${{ steps.test-result.outputs.immediately-close }}';
@@ -168,19 +178,19 @@ jobs:
168
178
"POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches",
169
179
{
170
180
owner: "vercel",
171
- repo: "front ",
172
- workflow_id: "cron-update-next.yml ",
181
+ repo: "${{ matrix.repo }} ",
182
+ workflow_id: "${{ matrix.workflow_id }} ",
173
183
ref: "main",
174
184
inputs: inputs,
175
185
}
176
186
);
177
187
// Ideally we'd include a URL to this specific sync.
178
188
// However, creating a workflow_dispatch event does not produce an ID: https://github.com/orgs/community/discussions/9752
179
189
console.info(
180
- "Sync started in https://github.com/vercel/front/actions/workflows/cron-update-next.yml?query=event%3Aworkflow_dispatch "
190
+ "Sync started in ${{ matrix.workflow_url }} "
181
191
);
182
192
console.info(
183
- "This may not start a new sync if one is already in progress. Check the logs of the cron-update-next Workflow run."
193
+ "This may not start a new sync if one is already in progress. Check the logs of the workflow run."
184
194
);
185
195
if (immediatelyClose === 'true') {
186
196
console.info(
0 commit comments