-
-
Notifications
You must be signed in to change notification settings - Fork 5
53 lines (43 loc) · 1.44 KB
/
sync-status-check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: ✅Sync Status Check
defaults:
run:
shell: pwsh
on:
pull_request_target:
branches: [main, preview]
jobs:
sync_status_check:
name: Sync Status Check
if: startsWith(github.head_ref, 'feature/')
runs-on: ubuntu-latest
steps:
- name: Set Up Deno
uses: denoland/setup-deno@v1
with:
deno-version: ${{ vars.DENO_VERSION }}
- name: Run Sync Status Check
run: |
$scriptUrl = "${{ vars.SCRIPT_BASE_URL }}/${{ vars.CICD_SCRIPTS_VERSION }}/${{ vars.SCRIPT_RELATIVE_DIR_PATH}}/sync-bot-status-check.ts";
$prNumber = "${{ github.event.number }}";
Write-Host "::notice::Project Name: ${{ vars.PROJECT_NAME }}";
Write-Host "::notice::PR Number: $prNumber";
Write-Host "::notice::Event Type: pr";
if ($manuallyExecuted -and $prNumber -eq "0") {
Write-Host "::notice::The issue or PR number must be a value greater than 0.";
exit 1;
}
<# Deno Args:
1. Organization name
2. Project name
3. Pull request number
4. Event Type - set to pull request event type
5. PAT
#>
deno run `
--allow-net --allow-read `
"$scriptUrl" `
"${{ vars.ORGANIZATION_NAME }}" `
"${{ vars.PROJECT_NAME }}" `
"$prNumber" `
"pr" `
"${{ secrets.CICD_TOKEN }}";