File tree 3 files changed +43
-2
lines changed 3 files changed +43
-2
lines changed Original file line number Diff line number Diff line change
1
+ name : Nightly Package Update
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ inputs :
6
+ dryrun :
7
+ default : false
8
+ type : boolean
9
+ description : Dry Run
10
+ schedule :
11
+ - cron : ' 0 1 * * *'
12
+
13
+ jobs :
14
+ Nightly_Package_Update :
15
+ uses : 51Degrees/common-ci/.github/workflows/nightly-package-update.yml@main
16
+ with :
17
+ repo-name : ${{ github.event.repository.name }}
18
+ org-name : ${{ github.event.repository.owner.login }}
19
+ dryrun : ${{ inputs.dryrun || false }}
20
+ secrets :
21
+ token : ${{ secrets.ACCESS_TOKEN }}
Original file line number Diff line number Diff line change 7
7
default : false
8
8
type : boolean
9
9
description : Dry Run
10
- schedule :
11
- - cron : ' 0 1 * * *'
10
+ workflow_run :
11
+ workflows : [Nightly Package Update]
12
+ types : [completed]
12
13
13
14
jobs :
14
15
Nightly_PRs_to_Main :
Original file line number Diff line number Diff line change
1
+ param (
2
+ [Parameter (Mandatory = $true )]
3
+ [string ]$RepoName ,
4
+ [Parameter (Mandatory = $true )]
5
+ [string ]$OrgName ,
6
+ [bool ]$DryRun = $false
7
+ )
8
+
9
+ Write-Output " Downloading latest javascript-templates..."
10
+ Invoke-WebRequest " https://github.com/$OrgName /javascript-templates/archive/refs/heads/main.zip" - OutFile javascript- templates.zip
11
+
12
+ Write-Output " Extracting the archive..."
13
+ Expand-Archive javascript- templates.zip - DestinationPath .
14
+
15
+ Write-Output " Updating the package directory..."
16
+ Move-Item - Path javascript- templates- main/* .mustache - Destination $RepoName / javascript- templates - Force
17
+
18
+ Write-Output " Cleaning up..."
19
+ Remove-Item javascript- templates.zip, javascript- templates- main - Recurse
You can’t perform that action at this time.
0 commit comments