File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8080
8181 $SelectedProject = "${{ inputs.project }}"
8282
83- $currentHash = git rev-parse origin/main
83+ $currentHash = git rev-parse HEAD
8484 if (-not $currentHash) {
85- Write-Host "Cannot fetch hash of origin/main "
85+ Write-Host "Cannot fetch hash of HEAD "
8686 exit 1
8787 }
8888
Original file line number Diff line number Diff line change 1+ name : " service::event_dispatcher::pull_request::closed::main"
2+ on :
3+ pull_request :
4+ types : [closed]
5+ branches : [main]
6+
7+ jobs :
8+ mark :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - name : Emit metadata
12+ run : echo "Running for PR ${{ github.event.number }} state=${{ github.event.action }}"
Original file line number Diff line number Diff line change 11name : Update nuspec files
22
33on :
4- workflow_dispatch :
5- inputs :
6- force :
7- required : true
8- type : boolean
9- default : false
10- description : " Force recreation of nuspec files"
11- pull_request :
12- types :
13- - closed
14- branches :
15- - main
4+ workflow_run :
5+ workflows : ["service::event_dispatcher::pull_request::closed::main"]
6+ types :
7+ - completed
168
179concurrency :
1810 group : update-nuspec
@@ -21,6 +13,11 @@ concurrency:
2113jobs :
2214 validate :
2315 runs-on : ubuntu-latest
16+ if : >
17+ github.event.workflow_run.event == 'pull_request' &&
18+ github.event.workflow_run.conclusion == 'success' &&
19+ fromJson(github.event.workflow_run.payload).pull_request.state == 'closed' &&
20+ fromJson(github.event.workflow_run.payload).pull_request.base.ref == 'main'
2421 env :
2522 PULL_REQUEST_MERGED : ${{ github.event.pull_request.merged }}
2623 outputs :
You can’t perform that action at this time.
0 commit comments