-
Notifications
You must be signed in to change notification settings - Fork 32
984 lines (855 loc) · 59.2 KB
/
Rebuild Database Templates.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
# SPDX-License-Identifier: Apache-2.0
# Licensed to the Ed-Fi Alliance under one or more agreements.
# The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.
# See the LICENSE and NOTICES files in the project root for more information.
# When to Use :
#Pre-Condition :
# Ed-Fi-ODS ,Ed-Fi-ODS-Implementation & Ed-Fi-Extensions should have working branch i.e ODS_*
# when you want to run this workflow manually , This workflow should not be executed from Main branch.
# 1.If Data Standard upgrade happens ,then we should update database template based packages
# 2.If Ed-Fi-Extensions repo - EdFi.Ods.Extensions.* code changes happens,then we should update database template based packages
# 3.If CodeGen project has code changes ,then we should update database template based packages
# 4.If any code change happens in \Ed-Fi-ODS-Implementation\DatabaseTemplate or \Ed-Fi-ODS-Implementation\logistics\scripts folder
# 5.If Powershell upgrade major/minor version upgrade happens
name: Rebuild Database Templates
on:
workflow_dispatch:
inputs:
rebuildLevel:
description: "Rebuild and package CodeGen library, Standard/Extension .NET assemblies, and the ODS/API database templates"
required: true
default: "DatabaseTemplates"
type: choice
options:
- CodeGen
- DotNetPackages
- DatabaseTemplates
permissions: read-all
env:
INFORMATIONAL_VERSION: "7.3"
CONFIGURATION: "Release"
HEAD_REF: ${{ GITHUB.HEAD_REF }}
REF_NAME: ${{ GITHUB.REF_NAME }}
REPOSITORY_DISPATCH_BRANCH: ${{ github.event.client_payload.branch }}
EDFI_ODS_TOKEN: ${{ secrets.REPO_DISPATCH_TOKEN }}
jobs:
FindStandardAndExtensionVersions:
uses: Ed-Fi-Alliance-OSS/Ed-Fi-ODS/.github/workflows/Find Standard and Extension Versions.yml@874b608a0f3a14243e0035dd1222169fafcbe8d3
with:
calling_branch: ${{ github.head_ref || github.ref_name }}
build:
runs-on: ubuntu-latest
needs: FindStandardAndExtensionVersions
permissions:
contents: write
steps:
- name: Checkout Ed-Fi-ODS-Implementation
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- name: Extract StandardVersion
id: extract_version
run: echo "standard_version=${{ fromJson(needs.FindStandardAndExtensionVersions.outputs.StandardVersions)[0] }}" >> $GITHUB_ENV
- name: Set Current Branch Environment Variable
shell: pwsh
run: |
$current_branch = '${{env.REF_NAME}}'
if ($current_branch -like "*/merge"){
$current_branch = '${{env.HEAD_REF}}'
}
Write-Host "Current Branch: $current_branch"
echo "current_branch=$current_branch" >> $Env:GITHUB_ENV
if ($current_branch -eq 'main') {
Write-Host "Current branch is main. Stopping the build."
exit 1
}
- name: Check ${{ env.current_branch }} branch exists in all 3 repositories or not
shell: pwsh
run: |
$url = "https://api.github.com/repos/Ed-Fi-Alliance-OSS/Ed-Fi-ODS-Implementation/branches/${{ env.current_branch }}"
.\build.githubactions.ps1 TestBranchExists -RepoName "Ed-Fi-ODS-Implementation" -BranchName "${{ env.current_branch }}" -Url $url
$url = "https://api.github.com/repos/Ed-Fi-Alliance-OSS/Ed-Fi-ODS/branches/${{ env.current_branch }}"
.\build.githubactions.ps1 TestBranchExists -RepoName "Ed-Fi-ODS" -BranchName "${{ env.current_branch }}" -Url $url
$url = "https://api.github.com/repos/Ed-Fi-Alliance-OSS/Ed-Fi-Extensions/branches/${{ env.current_branch }}"
.\build.githubactions.ps1 TestBranchExists -RepoName "Ed-Fi-Extensions" -BranchName "${{ env.current_branch }}" -Url $url
- name: Check for any failed previous workflow runs in the current branch
shell: pwsh
run: |
$workflow_file_name = "Rebuild Database Templates.yml"
$url = "https://api.github.com/repos/Ed-Fi-Alliance-OSS/Ed-Fi-ODS-Implementation/actions/workflows/$workflow_file_name/runs?branch=${{ env.current_branch }}"
$expectedConclusions = @('failure', 'cancelled')
.\build.githubactions.ps1 'WorkflowCheck' -Url $url -ExpectedStatus 'completed' -ExpectedConclusions $expectedConclusions -StatusEnvName 'failed_buildexists'
- name: Download repositories.json from last run
if: ${{ env.failed_buildexists == 'true' }}
uses: dawidd6/action-download-artifact@71072fbb1229e1317f1a8de6b04206afb461bd67 #v3.1.2
with:
workflow: Rebuild Database Templates.yml
name: repositories-json
workflow_conclusion: ("failure","cancelled")
path: ${{ github.workspace }}/Ed-Fi-ODS-Implementation/
run_id: ${{ env.rebuild_database_templates_lastrunId }}
repo: Ed-Fi-Alliance-OSS/Ed-Fi-ODS-Implementation
check_artifacts: true
allow_forks: false
if_no_artifact_found: ignore
continue-on-error: true
- name: Read the last commit for Ed-Fi-ODS-Implementation and store it in repositories.json
shell: pwsh
run: |
$oneEightyDaysAgo = (Get-Date).AddDays(-180).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ")
Write-Host "oneeightyDaysAgo Date and Time in ISO 8601 format: $oneEightyDaysAgo"
$branchName = "${{ env.current_branch }}"
$sinceDate = $oneEightyDaysAgo
$implementationUrl = "https://api.github.com/repos/Ed-Fi-Alliance-OSS/Ed-Fi-ODS-Implementation/commits?sha=$branchName&since=$sinceDate&page=1&per_page=200"
.\build.githubactions.ps1 'CreateOrUpdateRepositoriesJson' -Url $implementationUrl -RepoName 'Ed-Fi-ODS-Implementation'
- name: Read the last commit for Ed-Fi-ODS and store it in repositories.json
shell: pwsh
run: |
$oneEightyDaysAgo = (Get-Date).AddDays(-180).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ")
Write-Host "oneeightyDaysAgo Date and Time in ISO 8601 format: $oneEightyDaysAgo"
$branchName = "${{ env.current_branch }}"
$sinceDate = $oneEightyDaysAgo
$odsUrl = "https://api.github.com/repos/Ed-Fi-Alliance-OSS/Ed-Fi-ODS/commits?sha=$branchName&since=$sinceDate&page=1&per_page=200"
.\build.githubactions.ps1 'CreateOrUpdateRepositoriesJson' -Url $odsUrl -RepoName 'Ed-Fi-ODS'
- name: Read the last commit for Ed-Fi-Extensions and store it in repositories.json
shell: pwsh
run: |
$oneEightyDaysAgo = (Get-Date).AddDays(-180).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ")
Write-Host "oneeightyDaysAgo Date and Time in ISO 8601 format: $oneEightyDaysAgo"
$branchName = "${{ env.current_branch }}"
$sinceDate = $oneEightyDaysAgo
$extensionsUrl = "https://api.github.com/repos/Ed-Fi-Alliance-OSS/Ed-Fi-Extensions/commits?sha=$branchName&since=$sinceDate&page=1&per_page=200"
.\build.githubactions.ps1 'CreateOrUpdateRepositoriesJson' -Url $extensionsUrl -RepoName 'Ed-Fi-Extensions'
- name: Check for IscommitChanged in repositories.json
shell: pwsh
run: |
$FilePath = "repositories.json"
# Read and parse the JSON file
$jsonContent = Get-Content -Path $FilePath | ConvertFrom-Json
# Check if any repository has IscommitChanged set to true
$isCommitChanged = $jsonContent.repositories | Where-Object { $_.IscommitChanged -eq 'true' }
if ($isCommitChanged) {
# Set environment variable if any repository has IscommitChanged set to true
echo "NoNewCommitsInAllThreeRepositories=false" >> $Env:GITHUB_ENV
Write-Host "NoNewCommitsInAllThreeRepositories is false."
} else {
# Optionally, you can set it to false if no repository has IscommitChanged set to true
echo "NoNewCommitsInAllThreeRepositories=true" >> $Env:GITHUB_ENV
Write-Host "NoNewCommitsInAllThreeRepositories is true."
}
echo "Homograph_package_alreadyupdated=false" >> $Env:GITHUB_ENV
echo "Sample_package_alreadyupdated=false" >> $Env:GITHUB_ENV
echo "TPDM_package_alreadyupdated=false" >> $Env:GITHUB_ENV
echo "codeGen_successful_runexist=false" >> $Env:GITHUB_ENV
echo "populated_template_successful_runexist=false" >> $Env:GITHUB_ENV
echo "populated_template_package_alreadyupdated=false" >> $Env:GITHUB_ENV
echo "populated_template_postgreSQL_successful_runexist=false" >> $Env:GITHUB_ENV
echo "populated_template_postgreSQL_package_alreadyupdated=false" >> $Env:GITHUB_ENV
echo "minimal_template_successful_runexist=false" >> $Env:GITHUB_ENV
echo "minimal_template_package_alreadyupdated=false" >> $Env:GITHUB_ENV
echo "minimal_template_postgreSQL_successful_runexist=false" >> $Env:GITHUB_ENV
echo "minimal_template_postgreSQL_package_alreadyupdated=false" >> $Env:GITHUB_ENV
- name: Upload repositories.json as an artifact
if: success()
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
with:
name: repositories-json
path: repositories.json
- name: Check if any successful workflow run in Pkg EdFi.Ods.CodeGen.yml
if: ${{ env.NoNewCommitsInAllThreeRepositories == 'true' }}
shell: pwsh
run: |
$workflow_file_name = "Pkg EdFi.Ods.CodeGen.yml"
$url = "https://api.github.com/repos/Ed-Fi-Alliance-OSS/Ed-Fi-ODS/actions/workflows/$workflow_file_name/runs?branch=${{ env.current_branch }}"
.\build.githubactions.ps1 'WorkflowCheck' -Url $url -ExpectedStatus 'completed' -ExpectedConclusions @('success') -StatusEnvName 'codeGen_successful_runexist'
- name: Check if configuration.packages.json has an updated EdFi.Ods.CodeGen package version
if: ${{ env.codeGen_successful_runexist == 'true' }}
shell: pwsh
run: |
.\build.githubactions.ps1 'ComparePackageVersions' -PackageName 'EdFi.Ods.CodeGen' -StatusEnvName 'EdFi.Ods.CodeGen_package_alreadyupdated'
- name: Dispatch EdFi.Ods.CodeGen workflow
if: ${{ env.NoNewCommitsInAllThreeRepositories == 'false' || (env.NoNewCommitsInAllThreeRepositories == 'true' && env.EdFi.Ods.CodeGen_package_alreadyupdated == 'false') }}
uses: Codex-/return-dispatch@9a2340d279253061c98206106038aab6ef0be02e #v1.14.0
id: return_dispatch_codegen
with:
token: ${{ env.EDFI_ODS_TOKEN }}
ref: ${{ env.current_branch }}
repo: Ed-Fi-ODS
owner: ${{ github.repository_owner }}
workflow: Pkg EdFi.Ods.CodeGen.yml
workflow_timeout_seconds: 4800
- name: Await to complete the execution for EdFi.Ods.CodeGen RunID ${{ steps.return_dispatch_codegen.outputs.run_id }}
if: ${{ env.NoNewCommitsInAllThreeRepositories == 'false' || (env.NoNewCommitsInAllThreeRepositories == 'true' && env.EdFi.Ods.CodeGen_package_alreadyupdated == 'false') }}
uses: Codex-/await-remote-run@d4a6dbf57245924ff4f23e0db929b8e3ef65486b #v1.12.2
with:
token: ${{ env.EDFI_ODS_TOKEN }}
repo: Ed-Fi-ODS
owner: ${{ github.repository_owner }}
run_id: ${{ steps.return_dispatch_codegen.outputs.run_id }}
run_timeout_seconds: 4800
poll_interval_ms: 5000
- name: Download Codegen artifact using Run Id ${{ steps.return_dispatch_codegen.outputs.run_id }}
if: ${{ env.NoNewCommitsInAllThreeRepositories == 'false' || (env.NoNewCommitsInAllThreeRepositories == 'true' && env.EdFi.Ods.CodeGen_package_alreadyupdated == 'false') }}
uses: dawidd6/action-download-artifact@71072fbb1229e1317f1a8de6b04206afb461bd67 #v3.1.2
with:
workflow: Pkg EdFi.Ods.CodeGen.yml
workflow_conclusion: success
name: NugetPackage.Artifacts
path: ${{ github.workspace }}/Ed-Fi-ODS-Implementation/NugetPackages/
run_id: ${{ steps.return_dispatch_codegen.outputs.run_id }}
repo: Ed-Fi-Alliance-OSS/Ed-Fi-ODS
check_artifacts: true
- name: Update configuration.packages.json with EdFi.Ods.CodeGen new package version
if: ${{ env.NoNewCommitsInAllThreeRepositories == 'false' || (env.NoNewCommitsInAllThreeRepositories == 'true' && env.EdFi.Ods.CodeGen_package_alreadyupdated == 'false') }}
shell: pwsh
run: |
$packageFolder = Get-Item -Path "${{ github.workspace }}/Ed-Fi-ODS-Implementation/NugetPackages/EdFi.Suite3.Ods.CodeGen.${{ env.INFORMATIONAL_VERSION }}.*" | Select-Object -Expand Name
$folderParts = $packageFolder -split "\."
$newRevision =$folderParts[$folderParts.Count- 2]
$packageversion = "${{ env.INFORMATIONAL_VERSION }}.$newRevision"
Write-Host "packageversion" $packageversion
$filePath = "./configuration.packages.json"
$config = Get-Content $filePath | ConvertFrom-Json
$config.packages.'EdFi.Ods.CodeGen'.PackageVersion = $packageversion
$config | ConvertTo-Json -Depth 10 | Out-File -FilePath $filePath -Encoding UTF8
- name: Add configuration.packages.json
run: |
git add configuration.packages.json
git status
- name: Commit and push updated EdFi.Ods.CodeGen package reference
uses: planetscale/ghcommit-action@4131649dbf2fdf1eb34421702972a5af7b0a8731 #v0.1.18
with:
commit_message: "Updating for new CodeGen version"
repo: ${{ github.repository }}
branch: ${{ env.current_branch }}
env:
GITHUB_TOKEN: ${{ secrets.REPO_DISPATCH_TOKEN }}
- name: Pull latest changes from the remote repository
run: git pull origin ${{ env.current_branch }}
- name: Check if any successful workflow run in Pkg EdFi.Ods.Extensions.Homograph.yml
if: ${{ env.NoNewCommitsInAllThreeRepositories == 'true' }}
shell: pwsh
run: |
$workflow_file_name = "Pkg EdFi.Ods.Extensions.Homograph.yml"
$url = "https://api.github.com/repos/Ed-Fi-Alliance-OSS/Ed-Fi-Extensions/actions/workflows/$workflow_file_name/runs?branch=${{ env.current_branch }}"
.\build.githubactions.ps1 'WorkflowCheck' -Url $url -ExpectedStatus 'completed' -ExpectedConclusions @('success') -StatusEnvName 'Homograph_successful_runexist'
- name: Check if configuration.packages.json has an updated EdFi.Ods.Extensions.Homograph package Version
if: ${{ env.Homograph_successful_runexist == 'true' }}
shell: pwsh
run: |
.\build.githubactions.ps1 'ComparePackageVersions' -PackageName 'homograph' -StatusEnvName 'Homograph_package_alreadyupdated'
- name: Check if any successful workflow run in Pkg EdFi.Ods.Extensions.Sample.yml
if: ${{ env.NoNewCommitsInAllThreeRepositories == 'true' }}
shell: pwsh
run: |
$workflow_file_name = "Pkg EdFi.Ods.Extensions.Sample.yml"
$url = "https://api.github.com/repos/Ed-Fi-Alliance-OSS/Ed-Fi-Extensions/actions/workflows/$workflow_file_name/runs?branch=${{ env.current_branch }}"
.\build.githubactions.ps1 'WorkflowCheck' -Url $url -ExpectedStatus 'completed' -ExpectedConclusions @('success') -StatusEnvName 'Sample_successful_runexist'
- name: Check if configuration.packages.json has an updated EdFi.Ods.Extensions.Sample package Version
if: ${{ env.Sample_successful_runexist == 'true' }}
shell: pwsh
run: |
.\build.githubactions.ps1 'ComparePackageVersions' -PackageName 'sample' -StatusEnvName 'Sample_package_alreadyupdated'
- name: Check if any successful workflow run in Pkg EdFi.Ods.Extensions.TPDM.yml
if: ${{ env.NoNewCommitsInAllThreeRepositories == 'true' }}
shell: pwsh
run: |
$workflow_file_name = "Pkg EdFi.Ods.Extensions.TPDM.yml"
$url = "https://api.github.com/repos/Ed-Fi-Alliance-OSS/Ed-Fi-Extensions/actions/workflows/$workflow_file_name/runs?branch=${{ env.current_branch }}"
.\build.githubactions.ps1 'WorkflowCheck' -Url $url -ExpectedStatus 'completed' -ExpectedConclusions @('success') -StatusEnvName 'TPDM_successful_runexist'
- name: Check if configuration.packages.json has an updated EdFi.Ods.Extensions.TPDM package Version
if: ${{ env.TPDM_successful_runexist == 'true' }}
shell: pwsh
run: |
.\build.githubactions.ps1 'ComparePackageVersions' -PackageName 'tpdm' -StatusEnvName 'TPDM_package_alreadyupdated'
- name: Dispatch EdFi.Ods.Extensions.Homograph workflow
if: ${{ ( env.NoNewCommitsInAllThreeRepositories == 'false' && (inputs.rebuildLevel == 'DotNetPackages' || inputs.rebuildLevel == 'DatabaseTemplates')) || ((env.NoNewCommitsInAllThreeRepositories == 'true' && env.Homograph_package_alreadyupdated == 'false' && (inputs.rebuildLevel == 'DotNetPackages' || inputs.rebuildLevel == 'DatabaseTemplates'))) }}
uses: Codex-/return-dispatch@9a2340d279253061c98206106038aab6ef0be02e #v1.14.0
id: return_dispatch_homograph
with:
token: ${{ env.EDFI_ODS_TOKEN }}
ref: ${{ env.current_branch }}
repo: Ed-Fi-Extensions
owner: ${{ github.repository_owner }}
workflow: Pkg EdFi.Ods.Extensions.Homograph.yml
workflow_timeout_seconds: 4800
- name: Dispatch EdFi.Ods.Extensions.Sample workflow
if: ${{ ( env.NoNewCommitsInAllThreeRepositories == 'false' && (inputs.rebuildLevel == 'DotNetPackages' || inputs.rebuildLevel == 'DatabaseTemplates')) || ((env.NoNewCommitsInAllThreeRepositories == 'true' && env.Sample_package_alreadyupdated == 'false' && (inputs.rebuildLevel == 'DotNetPackages' || inputs.rebuildLevel == 'DatabaseTemplates'))) }}
uses: Codex-/return-dispatch@9a2340d279253061c98206106038aab6ef0be02e #v1.14.0
id: return_dispatch_sample
with:
token: ${{ env.EDFI_ODS_TOKEN }}
ref: ${{ env.current_branch }}
repo: Ed-Fi-Extensions
owner: ${{ github.repository_owner }}
workflow: Pkg EdFi.Ods.Extensions.Sample.yml
workflow_timeout_seconds: 4800
- name: Dispatch EdFi.Ods.Extensions.TPDM worflow
if: ${{ ( env.NoNewCommitsInAllThreeRepositories == 'false' && (inputs.rebuildLevel == 'DotNetPackages' || inputs.rebuildLevel == 'DatabaseTemplates')) || ((env.NoNewCommitsInAllThreeRepositories == 'true' && env.TPDM_package_alreadyupdated == 'false' && (inputs.rebuildLevel == 'DotNetPackages' || inputs.rebuildLevel == 'DatabaseTemplates'))) }}
uses: Codex-/return-dispatch@9a2340d279253061c98206106038aab6ef0be02e #v1.14.0
id: return_dispatch_TPDM
with:
token: ${{ env.EDFI_ODS_TOKEN }}
ref: ${{ env.current_branch }}
repo: Ed-Fi-Extensions
owner: ${{ github.repository_owner }}
workflow: Pkg EdFi.Ods.Extensions.TPDM.yml
workflow_timeout_seconds: 4800
- name: Await to complete the execution for EdFi.Ods.Extensions.Homograph RunID ${{ steps.return_dispatch_homograph.outputs.run_id }}
if: ${{ ( env.NoNewCommitsInAllThreeRepositories == 'false' && (inputs.rebuildLevel == 'DotNetPackages' || inputs.rebuildLevel == 'DatabaseTemplates')) || ((env.NoNewCommitsInAllThreeRepositories == 'true' && env.Homograph_package_alreadyupdated == 'false' && (inputs.rebuildLevel == 'DotNetPackages' || inputs.rebuildLevel == 'DatabaseTemplates'))) }}
uses: Codex-/await-remote-run@d4a6dbf57245924ff4f23e0db929b8e3ef65486b #v1.12.2
with:
token: ${{ env.EDFI_ODS_TOKEN }}
repo: Ed-Fi-Extensions
owner: ${{ github.repository_owner }}
run_id: ${{ steps.return_dispatch_homograph.outputs.run_id }}
run_timeout_seconds: 4800
poll_interval_ms: 5000
- name: Await to complete the execution for EdFi.Ods.Extensions.Sample RunID ${{ steps.return_dispatch_sample.outputs.run_id }}
if: ${{ ( env.NoNewCommitsInAllThreeRepositories == 'false' && (inputs.rebuildLevel == 'DotNetPackages' || inputs.rebuildLevel == 'DatabaseTemplates')) || ((env.NoNewCommitsInAllThreeRepositories == 'true' && env.Sample_package_alreadyupdated == 'false' && (inputs.rebuildLevel == 'DotNetPackages' || inputs.rebuildLevel == 'DatabaseTemplates'))) }}
uses: Codex-/await-remote-run@d4a6dbf57245924ff4f23e0db929b8e3ef65486b #v1.12.2
with:
token: ${{ env.EDFI_ODS_TOKEN }}
repo: Ed-Fi-Extensions
owner: ${{ github.repository_owner }}
run_id: ${{ steps.return_dispatch_sample.outputs.run_id }}
run_timeout_seconds: 4800
poll_interval_ms: 5000
- name: Await to complete the execution for EdFi.Ods.Extensions.TPDM RunID ${{ steps.return_dispatch_TPDM.outputs.run_id }}
if: ${{ ( env.NoNewCommitsInAllThreeRepositories == 'false' && (inputs.rebuildLevel == 'DotNetPackages' || inputs.rebuildLevel == 'DatabaseTemplates')) || ((env.NoNewCommitsInAllThreeRepositories == 'true' && env.TPDM_package_alreadyupdated == 'false' && (inputs.rebuildLevel == 'DotNetPackages' || inputs.rebuildLevel == 'DatabaseTemplates'))) }}
uses: Codex-/await-remote-run@d4a6dbf57245924ff4f23e0db929b8e3ef65486b #v1.12.2
with:
token: ${{ env.EDFI_ODS_TOKEN }}
repo: Ed-Fi-Extensions
owner: ${{ github.repository_owner }}
run_id: ${{ steps.return_dispatch_TPDM.outputs.run_id }}
run_timeout_seconds: 4800
poll_interval_ms: 5000
- name: Download EdFi.Ods.Extensions.Homograph artifact using Run Id ${{ steps.return_dispatch_homograph.outputs.run_id }}
if: ${{ ( env.NoNewCommitsInAllThreeRepositories == 'false' && (inputs.rebuildLevel == 'DotNetPackages' || inputs.rebuildLevel == 'DatabaseTemplates')) || ((env.NoNewCommitsInAllThreeRepositories == 'true' && env.Homograph_package_alreadyupdated == 'false' && (inputs.rebuildLevel == 'DotNetPackages' || inputs.rebuildLevel == 'DatabaseTemplates'))) }}
uses: dawidd6/action-download-artifact@71072fbb1229e1317f1a8de6b04206afb461bd67 #v3.1.2
with:
workflow: Pkg EdFi.Ods.Extensions.Homograph.yml
workflow_conclusion: success
name: EdFi.Ods.Extensions.Homograph.Artifacts-${{ env.standard_version }}
path: ${{ github.workspace }}/Ed-Fi-ODS-Implementation/NugetPackages/
run_id: ${{ steps.return_dispatch_homograph.outputs.run_id }}
repo: Ed-Fi-Alliance-OSS/Ed-Fi-Extensions
check_artifacts: true
- name: Download EdFi.Ods.Extensions.Sample artifact using Run Id ${{ steps.return_dispatch_sample.outputs.run_id }}
if: ${{ ( env.NoNewCommitsInAllThreeRepositories == 'false' && (inputs.rebuildLevel == 'DotNetPackages' || inputs.rebuildLevel == 'DatabaseTemplates')) || ((env.NoNewCommitsInAllThreeRepositories == 'true' && env.Sample_package_alreadyupdated == 'false' && (inputs.rebuildLevel == 'DotNetPackages' || inputs.rebuildLevel == 'DatabaseTemplates'))) }}
uses: dawidd6/action-download-artifact@71072fbb1229e1317f1a8de6b04206afb461bd67 #v3.1.2
with:
workflow: Pkg EdFi.Ods.Extensions.Sample.yml
workflow_conclusion: success
name: EdFi.Ods.Extensions.Sample.Artifacts-${{ env.standard_version }}
path: ${{ github.workspace }}/Ed-Fi-ODS-Implementation/NugetPackages/
run_id: ${{ steps.return_dispatch_sample.outputs.run_id }}
repo: Ed-Fi-Alliance-OSS/Ed-Fi-Extensions
check_artifacts: true
- name: Download EdFi.Ods.Extensions.TPDM artifact using Run Id ${{ steps.return_dispatch_TPDM.outputs.run_id }}
if: ${{ ( env.NoNewCommitsInAllThreeRepositories == 'false' && (inputs.rebuildLevel == 'DotNetPackages' || inputs.rebuildLevel == 'DatabaseTemplates')) || ((env.NoNewCommitsInAllThreeRepositories == 'true' && env.TPDM_package_alreadyupdated == 'false' && (inputs.rebuildLevel == 'DotNetPackages' || inputs.rebuildLevel == 'DatabaseTemplates'))) }}
uses: dawidd6/action-download-artifact@71072fbb1229e1317f1a8de6b04206afb461bd67 #v3.1.2
with:
workflow: Pkg EdFi.Ods.Extensions.TPDM.yml
workflow_conclusion: success
name: EdFi.Ods.Extensions.TPDM.Artifacts-${{ env.standard_version }}
path: ${{ github.workspace }}/Ed-Fi-ODS-Implementation/NugetPackages/
run_id: ${{ steps.return_dispatch_TPDM.outputs.run_id }}
repo: Ed-Fi-Alliance-OSS/Ed-Fi-Extensions
check_artifacts: true
- name: Update configuration.packages.json with all Extensions Homograph, TPDM, Sample new package version
shell: pwsh
run: |
$filePath = "./configuration.packages.json"
$config = Get-Content $filePath | ConvertFrom-Json
Write-Host "NoNewCommitsInAllThreeRepositories: $env:NoNewCommitsInAllThreeRepositories"
Write-Host "inputs.rebuildLevel: ${{ github.event.inputs.rebuildLevel }}"
Write-Host "Homograph_package_alreadyupdated: $env:Homograph_package_alreadyupdated"
Write-Host "Sample_package_alreadyupdated: $env:Sample_package_alreadyupdated"
Write-Host "TPDM_package_alreadyupdated: $env:TPDM_package_alreadyupdated"
# Evaluate conditions based on environment variables
$isCommitNotChanged = $env:NoNewCommitsInAllThreeRepositories -eq 'false'
$isCommitChangedAndNotUpdated = $env:NoNewCommitsInAllThreeRepositories -eq 'true' -and $env:Homograph_package_alreadyupdated -eq 'false'
$rebuildLevel = '${{ github.event.inputs.rebuildLevel }}'
$isRebuildLevelValid = $rebuildLevel -in @('DotNetPackages', 'DatabaseTemplates')
Write-Host "isCommitNotChanged: $isCommitNotChanged"
Write-Host "isCommitChangedAndNotUpdated: $isCommitChangedAndNotUpdated"
Write-Host "isRebuildLevelValid: $isRebuildLevelValid"
if (($isCommitNotChanged -or $isCommitChangedAndNotUpdated) -and $isRebuildLevelValid)
{
$packageFolder = Get-Item -Path "${{ github.workspace }}/Ed-Fi-ODS-Implementation/NugetPackages/EdFi.Suite3.Ods.Extensions.Homograph.*${{ env.INFORMATIONAL_VERSION }}.*" | Select-Object -Expand Name
$folderParts = $packageFolder -split "\."
$newRevision =$folderParts[$folderParts.Count- 2]
$packageversion = "${{ env.INFORMATIONAL_VERSION }}.$newRevision"
Write-Host "Extensions.Homograph latestVersion" $packageversion
$config.packages.'homograph'.PackageVersion = $packageversion
}
$isCommitChangedAndNotUpdated = $env:NoNewCommitsInAllThreeRepositories -eq 'true' -and $env:Sample_package_alreadyupdated -eq 'false'
if (($isCommitNotChanged -or $isCommitChangedAndNotUpdated) -and $isRebuildLevelValid )
{
$packageFolder = Get-Item -Path "${{ github.workspace }}/Ed-Fi-ODS-Implementation/NugetPackages/EdFi.Suite3.Ods.Extensions.Sample.*${{ env.INFORMATIONAL_VERSION }}.*" | Select-Object -Expand Name
$folderParts = $packageFolder -split "\."
$newRevision =$folderParts[$folderParts.Count- 2]
$packageversion = "${{ env.INFORMATIONAL_VERSION }}.$newRevision"
Write-Host "Extensions.Sample latestVersion" $packageversion
$config.packages.'sample'.PackageVersion = $packageversion
}
$isCommitChangedAndNotUpdated = $env:NoNewCommitsInAllThreeRepositories -eq 'true' -and $env:TPDM_package_alreadyupdated -eq 'false'
if (($isCommitNotChanged -or $isCommitChangedAndNotUpdated) -and $isRebuildLevelValid )
{
$packageFolder = Get-Item -Path "${{ github.workspace }}/Ed-Fi-ODS-Implementation/NugetPackages/EdFi.Suite3.Ods.Extensions.TPDM.Core.*${{ env.INFORMATIONAL_VERSION }}.*" | Select-Object -Expand Name
$folderParts = $packageFolder -split "\."
$newRevision =$folderParts[$folderParts.Count- 2]
$packageversion = "${{ env.INFORMATIONAL_VERSION }}.$newRevision"
Write-Host "Extensions.TPDM latestVersion" $packageversion
$config.packages.'tpdm'.PackageVersion = $packageversion
}
$config | ConvertTo-Json -Depth 10 | Out-File -FilePath $filePath -Encoding UTF8
- name: Add configuration.packages.json
run: |
git add configuration.packages.json
git status
- name: Commit and push updated Extensions- TPDM, Sample, Homograph package references
uses: planetscale/ghcommit-action@4131649dbf2fdf1eb34421702972a5af7b0a8731 #v0.1.18
with:
commit_message: "Updating for new Extensions- TPDM, Sample, Homograph package version"
repo: ${{ github.repository }}
branch: ${{ env.current_branch }}
env:
GITHUB_TOKEN: ${{ secrets.REPO_DISPATCH_TOKEN }}
- name: Pull latest changes from the remote repository
run: git pull origin ${{ env.current_branch }}
- name: Check if any successful workflow run in Pkg EdFi.Ods.Populated.Template.yml
if: ${{ env.NoNewCommitsInAllThreeRepositories == 'true' }}
shell: pwsh
run: |
$workflow_file_name = "Pkg EdFi.Ods.Populated.Template.yml"
$url = "https://api.github.com/repos/Ed-Fi-Alliance-OSS/Ed-Fi-ODS/actions/workflows/$workflow_file_name/runs?branch=${{ env.current_branch }}"
.\build.githubactions.ps1 'WorkflowCheck' -Url $url -ExpectedStatus 'completed' -ExpectedConclusions @('success') -StatusEnvName 'populated_template_successful_runexist'
- name: Check if configuration.packages.json has an updated EdFi.Ods.Populated.Template package Version
if: ${{ env.populated_template_successful_runexist == 'true' }}
shell: pwsh
run: |
.\build.githubactions.ps1 'ComparePackageVersions' -PackageName 'GrandBend' -StatusEnvName 'populated_template_package_alreadyupdated'
- name: Check if any successful workflow run in Pkg EdFi.Ods.Populated.Template.PostgreSQL.yml
if: ${{ env.NoNewCommitsInAllThreeRepositories == 'true' }}
shell: pwsh
run: |
$workflow_file_name = "Pkg EdFi.Ods.Populated.Template.PostgreSQL.yml"
$url = "https://api.github.com/repos/Ed-Fi-Alliance-OSS/Ed-Fi-ODS/actions/workflows/$workflow_file_name/runs?branch=${{ env.current_branch }}"
.\build.githubactions.ps1 'WorkflowCheck' -Url $url -ExpectedStatus 'completed' -ExpectedConclusions @('success') -StatusEnvName 'populated_template_postgreSQL_successful_runexist'
- name: Check if configuration.packages.json has an updated EdFi.Ods.Populated.Template.PostgreSQL package Version
if: ${{ env.populated_template_postgreSQL_successful_runexist == 'true' }}
shell: pwsh
run: |
.\build.githubactions.ps1 'ComparePackageVersions' -PackageName 'PostgreSqlPopulatedTemplate' -StatusEnvName 'populated_template_postgreSQL_package_alreadyupdated'
- name: Check if any successful workflow run in Pkg EdFi.Ods.Minimal.Template.yml
if: ${{ env.NoNewCommitsInAllThreeRepositories == 'true' }}
shell: pwsh
run: |
$workflow_file_name = "Pkg EdFi.Ods.Minimal.Template.yml"
$url = "https://api.github.com/repos/Ed-Fi-Alliance-OSS/Ed-Fi-ODS/actions/workflows/$workflow_file_name/runs?branch=${{ env.current_branch }}"
.\build.githubactions.ps1 'WorkflowCheck' -Url $url -ExpectedStatus 'completed' -ExpectedConclusions @('success') -StatusEnvName 'minimal_template_successful_runexist'
- name: Check if configuration.packages.json has an updated EdFi.Ods.Minimal.Template package Version
if: ${{ env.minimal_template_successful_runexist == 'true' }}
shell: pwsh
run: |
.\build.githubactions.ps1 'ComparePackageVersions' -PackageName 'EdFiMinimalTemplate' -StatusEnvName 'minimal_template_package_alreadyupdated'
- name: Check if any successful workflow run in Pkg EdFi.Ods.Minimal.Template.PostgreSQL.yml
if: ${{ env.NoNewCommitsInAllThreeRepositories == 'true' }}
shell: pwsh
run: |
$workflow_file_name = "Pkg EdFi.Ods.Minimal.Template.PostgreSQL.yml"
$url = "https://api.github.com/repos/Ed-Fi-Alliance-OSS/Ed-Fi-ODS/actions/workflows/$workflow_file_name/runs?branch=${{ env.current_branch }}"
.\build.githubactions.ps1 'WorkflowCheck' -Url $url -ExpectedStatus 'completed' -ExpectedConclusions @('success') -StatusEnvName 'minimal_template_postgreSQL_successful_runexist'
- name: Check if configuration.packages.json has an updated EdFi.Ods.Minimal.Template.PostgreSQL package Version
if: ${{ env.minimal_template_postgreSQL_successful_runexist == 'true' }}
shell: pwsh
run: |
.\build.githubactions.ps1 'ComparePackageVersions' -PackageName 'PostgreSqlMinimalTemplate' -StatusEnvName 'minimal_template_postgreSQL_package_alreadyupdated'
- name: Dispatch EdFi.Ods.Populated.Template workflow
if: ${{ ((env.NoNewCommitsInAllThreeRepositories == 'false' && inputs.rebuildLevel == 'DatabaseTemplates') || (env.NoNewCommitsInAllThreeRepositories == 'true' && env.populated_template_package_alreadyupdated == 'false' && inputs.rebuildLevel == 'DatabaseTemplates')) }}
uses: Codex-/return-dispatch@9a2340d279253061c98206106038aab6ef0be02e #v1.14.0
id: return_dispatch_populated_template
with:
token: ${{ env.EDFI_ODS_TOKEN }}
ref: ${{ env.current_branch }}
repo: Ed-Fi-ODS
owner: ${{ github.repository_owner }}
workflow: Pkg EdFi.Ods.Populated.Template.yml
workflow_timeout_seconds: 4800
- name: Dispatch EdFi.Ods.Populated.Template.PostgreSQL workflow
if: ${{ (( env.NoNewCommitsInAllThreeRepositories == 'false' && inputs.rebuildLevel == 'DatabaseTemplates') || (env.NoNewCommitsInAllThreeRepositories == 'true' && env.populated_template_postgreSQL_package_alreadyupdated == 'false' && inputs.rebuildLevel == 'DatabaseTemplates')) }}
uses: Codex-/return-dispatch@9a2340d279253061c98206106038aab6ef0be02e #v1.14.0
id: return_dispatch_populated_template_postgresql
with:
token: ${{ env.EDFI_ODS_TOKEN }}
ref: ${{ env.current_branch }}
repo: Ed-Fi-ODS
owner: ${{ github.repository_owner }}
workflow: Pkg EdFi.Ods.Populated.Template.PostgreSQL.yml
workflow_timeout_seconds: 4800
- name: Dispatch EdFi.Ods.Minimal.Template workflow
if: ${{ (( env.NoNewCommitsInAllThreeRepositories == 'false' && inputs.rebuildLevel == 'DatabaseTemplates') || (env.NoNewCommitsInAllThreeRepositories == 'true' && env.minimal_template_package_alreadyupdated == 'false' && inputs.rebuildLevel == 'DatabaseTemplates')) }}
uses: Codex-/return-dispatch@9a2340d279253061c98206106038aab6ef0be02e #v1.14.0
id: return_dispatch_minimal_template
with:
token: ${{ env.EDFI_ODS_TOKEN }}
ref: ${{ env.current_branch }}
repo: Ed-Fi-ODS
owner: ${{ github.repository_owner }}
workflow: Pkg EdFi.Ods.Minimal.Template.yml
workflow_timeout_seconds: 4800
- name: Dispatch EdFi.Ods.Minimal.Template.PostgreSQL workflow
if: ${{ (( env.NoNewCommitsInAllThreeRepositories == 'false' && inputs.rebuildLevel == 'DatabaseTemplates') || (env.NoNewCommitsInAllThreeRepositories == 'true' && env.minimal_template_postgreSQL_package_alreadyupdated == 'false' && inputs.rebuildLevel == 'DatabaseTemplates')) }}
uses: Codex-/return-dispatch@9a2340d279253061c98206106038aab6ef0be02e #v1.14.0
id: return_dispatch_minimal_template_postgresql
with:
token: ${{ env.EDFI_ODS_TOKEN }}
ref: ${{ env.current_branch }}
repo: Ed-Fi-ODS
owner: ${{ github.repository_owner }}
workflow: Pkg EdFi.Ods.Minimal.Template.PostgreSQL.yml
workflow_timeout_seconds: 4800
- name: Await to complete the execution for EdFi.Ods.Minimal.Template.PostgreSQL RunID ${{ steps.return_dispatch_minimal_template_postgresql.outputs.run_id }}
if: ${{ (( env.NoNewCommitsInAllThreeRepositories == 'false' && inputs.rebuildLevel == 'DatabaseTemplates') || (env.NoNewCommitsInAllThreeRepositories == 'true' && env.minimal_template_postgreSQL_package_alreadyupdated == 'false' && inputs.rebuildLevel == 'DatabaseTemplates')) }}
uses: Codex-/await-remote-run@d4a6dbf57245924ff4f23e0db929b8e3ef65486b #v1.12.2
with:
token: ${{ env.EDFI_ODS_TOKEN }}
repo: Ed-Fi-ODS
owner: ${{ github.repository_owner }}
run_id: ${{ steps.return_dispatch_minimal_template_postgresql.outputs.run_id }}
run_timeout_seconds: 4800
poll_interval_ms: 5000
- name: Await to complete the execution for EdFi.Ods.Minimal.Template RunID ${{ steps.return_dispatch_minimal_template.outputs.run_id }}
if: ${{ (( env.NoNewCommitsInAllThreeRepositories == 'false' && inputs.rebuildLevel == 'DatabaseTemplates') || (env.NoNewCommitsInAllThreeRepositories == 'true' && env.minimal_template_package_alreadyupdated == 'false' && inputs.rebuildLevel == 'DatabaseTemplates')) }}
uses: Codex-/await-remote-run@d4a6dbf57245924ff4f23e0db929b8e3ef65486b #v1.12.2
with:
token: ${{ env.EDFI_ODS_TOKEN }}
repo: Ed-Fi-ODS
owner: ${{ github.repository_owner }}
run_id: ${{ steps.return_dispatch_minimal_template.outputs.run_id }}
run_timeout_seconds: 4800
poll_interval_ms: 5000
- name: Await to complete the execution for EdFi.Ods.Populated.Template RunID ${{ steps.return_dispatch_populated_template.outputs.run_id }}
if: ${{ (( env.NoNewCommitsInAllThreeRepositories == 'false' && inputs.rebuildLevel == 'DatabaseTemplates') || (env.NoNewCommitsInAllThreeRepositories == 'true' && env.populated_template_package_alreadyupdated == 'false' && inputs.rebuildLevel == 'DatabaseTemplates')) }}
uses: Codex-/await-remote-run@d4a6dbf57245924ff4f23e0db929b8e3ef65486b #v1.12.2
with:
token: ${{ env.EDFI_ODS_TOKEN }}
repo: Ed-Fi-ODS
owner: ${{ github.repository_owner }}
run_id: ${{ steps.return_dispatch_populated_template.outputs.run_id }}
run_timeout_seconds: 4800
poll_interval_ms: 5000
- name: Await to complete the execution for EdFi.Ods.Populated.Template.PostgreSQL RunID ${{ steps.return_dispatch_populated_template_postgresql.outputs.run_id }}
if: ${{ (( env.NoNewCommitsInAllThreeRepositories == 'false' && inputs.rebuildLevel == 'DatabaseTemplates') || (env.NoNewCommitsInAllThreeRepositories == 'true' && env.populated_template_postgreSQL_package_alreadyupdated == 'false' && inputs.rebuildLevel == 'DatabaseTemplates')) }}
uses: Codex-/await-remote-run@d4a6dbf57245924ff4f23e0db929b8e3ef65486b #v1.12.2
with:
token: ${{ env.EDFI_ODS_TOKEN }}
repo: Ed-Fi-ODS
owner: ${{ github.repository_owner }}
run_id: ${{ steps.return_dispatch_populated_template_postgresql.outputs.run_id }}
run_timeout_seconds: 4800
poll_interval_ms: 5000
- name: Download EdFi.Ods.Minimal.Template artifact using Run Id ${{ steps.return_dispatch_minimal_template.outputs.run_id }}
if: ${{ (( env.NoNewCommitsInAllThreeRepositories == 'false' && inputs.rebuildLevel == 'DatabaseTemplates') || (env.NoNewCommitsInAllThreeRepositories == 'true' && env.minimal_template_package_alreadyupdated == 'false' && inputs.rebuildLevel == 'DatabaseTemplates')) }}
uses: dawidd6/action-download-artifact@71072fbb1229e1317f1a8de6b04206afb461bd67 #v3.1.2
with:
workflow: Pkg EdFi.Ods.Minimal.Template.yml
workflow_conclusion: success
name: NugetPackages.Artifacts-${{ env.standard_version }}
path: ${{ github.workspace }}/Ed-Fi-ODS-Implementation/NugetPackages/
repo: Ed-Fi-Alliance-OSS/Ed-Fi-ODS
run_id: ${{ steps.return_dispatch_minimal_template.outputs.run_id }}
check_artifacts: true
- name: Download EdFi.Ods.Minimal.Template.PostgreSQL artifact using Run Id ${{ steps.return_dispatch_minimal_template_postgresql.outputs.run_id }}
if: ${{ (( env.NoNewCommitsInAllThreeRepositories == 'false' && inputs.rebuildLevel == 'DatabaseTemplates') || (env.NoNewCommitsInAllThreeRepositories == 'true' && env.minimal_template_postgreSQL_package_alreadyupdated == 'false' && inputs.rebuildLevel == 'DatabaseTemplates')) }}
uses: dawidd6/action-download-artifact@71072fbb1229e1317f1a8de6b04206afb461bd67 #v3.1.2
with:
workflow: Pkg EdFi.Ods.Minimal.Template.PostgreSQL.yml
workflow_conclusion: success
name: NugetPackages.Artifacts-${{ env.standard_version }}
path: ${{ github.workspace }}/Ed-Fi-ODS-Implementation/NugetPackages/
repo: Ed-Fi-Alliance-OSS/Ed-Fi-ODS
run_id: ${{ steps.return_dispatch_minimal_template_postgresql.outputs.run_id }}
check_artifacts: true
- name: Download EdFi.Ods.Populated.Template artifact using Run Id ${{ steps.return_dispatch_populated_template.outputs.run_id }}
if: ${{ (( env.NoNewCommitsInAllThreeRepositories == 'false' && inputs.rebuildLevel == 'DatabaseTemplates') || (env.NoNewCommitsInAllThreeRepositories == 'true' && env.populated_template_package_alreadyupdated == 'false' && inputs.rebuildLevel == 'DatabaseTemplates')) }}
uses: dawidd6/action-download-artifact@71072fbb1229e1317f1a8de6b04206afb461bd67 #v3.1.2
with:
workflow: Pkg EdFi.Ods.Populated.Template.yml
workflow_conclusion: success
name: NugetPackages.Artifacts-${{ env.standard_version }}
path: ${{ github.workspace }}/Ed-Fi-ODS-Implementation/NugetPackages/
repo: Ed-Fi-Alliance-OSS/Ed-Fi-ODS
run_id: ${{ steps.return_dispatch_populated_template.outputs.run_id }}
check_artifacts: true
- name: Download EdFi.Ods.Populated.Template.PostgreSQL artifact using Run Id ${{ steps.return_dispatch_populated_template_postgresql.outputs.run_id }}
if: ${{ (( env.NoNewCommitsInAllThreeRepositories == 'false' && inputs.rebuildLevel == 'DatabaseTemplates') || (env.NoNewCommitsInAllThreeRepositories == 'true' && env.populated_template_postgreSQL_package_alreadyupdated == 'false' && inputs.rebuildLevel == 'DatabaseTemplates')) }}
uses: dawidd6/action-download-artifact@71072fbb1229e1317f1a8de6b04206afb461bd67 #v3.1.2
with:
workflow: Pkg EdFi.Ods.Populated.Template.PostgreSQL.yml
workflow_conclusion: success
name: NugetPackages.Artifacts-${{ env.standard_version }}
path: ${{ github.workspace }}/Ed-Fi-ODS-Implementation/NugetPackages/
repo: Ed-Fi-Alliance-OSS/Ed-Fi-ODS
run_id: ${{ steps.return_dispatch_populated_template_postgresql.outputs.run_id }}
check_artifacts: true
- name: Update configuration.packages.json with all EdFi.Ods.Minimal.Template , EdFi.Ods.Minimal.Template.PostgreSQL ,EdFi.Ods.Populated.Template ,EdFi.Ods.Populated.Template.PostgreSQL new package version
shell: pwsh
run: |
$filePath = "./configuration.packages.json"
$config = Get-Content $filePath | ConvertFrom-Json
Write-Host "NoNewCommitsInAllThreeRepositories: $env:NoNewCommitsInAllThreeRepositories"
Write-Host "inputs.rebuildLevel: ${{ github.event.inputs.rebuildLevel }}"
Write-Host "populated_template_successful_runexist: $env:populated_template_successful_runexist"
Write-Host "populated_template_package_alreadyupdated: $env:populated_template_package_alreadyupdated"
Write-Host "populated_template_postgreSQL_successful_runexist: $env:populated_template_postgreSQL_successful_runexist"
Write-Host "populated_template_postgreSQL_package_alreadyupdated: $env:populated_template_postgreSQL_package_alreadyupdated"
Write-Host "minimal_template_successful_runexist: $env:minimal_template_successful_runexist"
Write-Host "minimal_template_package_alreadyupdated: $env:minimal_template_package_alreadyupdated"
Write-Host "minimal_template_postgreSQL_successful_runexist: $env:minimal_template_postgreSQL_successful_runexist"
Write-Host "minimal_template_postgreSQL_package_alreadyupdated: $env:minimal_template_postgreSQL_package_alreadyupdated"
# Evaluate conditions based on environment variables
$isCommitNotChanged = $env:NoNewCommitsInAllThreeRepositories -eq 'false'
$isCommitChangedAndNotUpdated = $env:NoNewCommitsInAllThreeRepositories -eq 'true' -and $env:minimal_template_package_alreadyupdated -eq 'false'
$rebuildLevel = '${{ github.event.inputs.rebuildLevel }}'
$isRebuildLevelValid = $rebuildLevel -in @('DatabaseTemplates')
Write-Host "isCommitNotChanged: $isCommitNotChanged"
Write-Host "isCommitChangedAndNotUpdated: $isCommitChangedAndNotUpdated"
Write-Host "isRebuildLevelValid: $isRebuildLevelValid"
if (($isCommitNotChanged -or $isCommitChangedAndNotUpdated) -and $isRebuildLevelValid)
{
$packageFolder = Get-Item -Path "${{ github.workspace }}/Ed-Fi-ODS-Implementation/NugetPackages/EdFi.Suite3.Ods.Minimal.Template.*${{ env.INFORMATIONAL_VERSION }}.*" | Select-Object -Expand Name
$folderParts = $packageFolder -split "\."
$newRevision =$folderParts[$folderParts.Count- 2]
$packageversion = "${{ env.INFORMATIONAL_VERSION }}.$newRevision"
Write-Host "EdFi.Suite3.Ods.Minimal.Template latestVersion" $packageversion
$config.packages.'EdFiMinimalTemplate'.PackageVersion = $packageversion
}
$isCommitChangedAndNotUpdated = $env:NoNewCommitsInAllThreeRepositories -eq 'true' -and $env:minimal_template_postgreSQL_package_alreadyupdated -eq 'false'
if (($isCommitNotChanged -or $isCommitChangedAndNotUpdated) -and $isRebuildLevelValid)
{
$packageFolder = Get-Item -Path "${{ github.workspace }}/Ed-Fi-ODS-Implementation/NugetPackages/EdFi.Suite3.Ods.Minimal.Template.PostgreSQL.*${{ env.INFORMATIONAL_VERSION }}.*" | Select-Object -Expand Name
$folderParts = $packageFolder -split "\."
$newRevision =$folderParts[$folderParts.Count- 2]
$packageversion = "${{ env.INFORMATIONAL_VERSION }}.$newRevision"
Write-Host "EdFi.Suite3.Ods.Minimal.Template.PostgreSQL latestVersion" $packageversion
$config.packages.'PostgreSqlMinimalTemplate'.PackageVersion = $packageversion
}
$isCommitChangedAndNotUpdated = $env:NoNewCommitsInAllThreeRepositories -eq 'true' -and $env:populated_template_package_alreadyupdated -eq 'false'
if (($isCommitNotChanged -or $isCommitChangedAndNotUpdated) -and $isRebuildLevelValid)
{
$packageFolder = Get-Item -Path "${{ github.workspace }}/Ed-Fi-ODS-Implementation/NugetPackages/EdFi.Suite3.Ods.Populated.Template.*${{ env.INFORMATIONAL_VERSION }}.*" | Select-Object -Expand Name
$folderParts = $packageFolder -split "\."
$newRevision =$folderParts[$folderParts.Count- 2]
$packageversion = "${{ env.INFORMATIONAL_VERSION }}.$newRevision"
Write-Host " EdFi.Suite3.Ods.Populated.Template latestVersion" $packageversion
$config.packages.'GrandBend'.PackageVersion = $packageversion
}
$isCommitChangedAndNotUpdated = $env:NoNewCommitsInAllThreeRepositories -eq 'true' -and $env:populated_template_postgreSQL_package_alreadyupdated -eq 'false'
if (($isCommitNotChanged -or $isCommitChangedAndNotUpdated) -and $isRebuildLevelValid)
{
$packageFolder = Get-Item -Path "${{ github.workspace }}/Ed-Fi-ODS-Implementation/NugetPackages/EdFi.Suite3.Ods.Populated.Template.PostgreSQL.*${{ env.INFORMATIONAL_VERSION }}.*" | Select-Object -Expand Name
$folderParts = $packageFolder -split "\."
$newRevision =$folderParts[$folderParts.Count- 2]
$packageversion = "${{ env.INFORMATIONAL_VERSION }}.$newRevision"
Write-Host " EdFi.Suite3.Ods.Populated.Template.PostgreSQL latestVersion" $packageversion
$config.packages.'PostgreSqlPopulatedTemplate'.PackageVersion = $packageversion
}
$config | ConvertTo-Json -Depth 10 | Out-File -FilePath $filePath -Encoding UTF8
- name: Add configuration.packages.json
run: |
git add configuration.packages.json
git status
- name: Commit and push updated EdFi.Ods.Minimal.Template , EdFi.Ods.Minimal.Template.PostgreSQL ,EdFi.Ods.Populated.Template ,EdFi.Ods.Populated.Template.PostgreSQL new package version
uses: planetscale/ghcommit-action@4131649dbf2fdf1eb34421702972a5af7b0a8731 #v0.1.18
with:
commit_message: "Updating for new EdFi.Ods.Minimal.Template , EdFi.Ods.Minimal.Template.PostgreSQL ,EdFi.Ods.Populated.Template ,EdFi.Ods.Populated.Template.PostgreSQL package version"
repo: ${{ github.repository }}
branch: ${{ env.current_branch }}
env:
GITHUB_TOKEN: ${{ secrets.REPO_DISPATCH_TOKEN }}
- name: Pull latest changes from the remote repository
run: git pull origin ${{ env.current_branch }}
- name: Dispatch EdFi.Ods.Populated.Template.TPDM workflow
if: inputs.rebuildLevel == 'DatabaseTemplates'
uses: Codex-/return-dispatch@9a2340d279253061c98206106038aab6ef0be02e #v1.14.0
id: return_dispatch_populated_template_TPDM
with:
token: ${{ env.EDFI_ODS_TOKEN }}
ref: ${{ env.current_branch }}
repo: Ed-Fi-ODS
owner: ${{ github.repository_owner }}
workflow: Pkg EdFi.Ods.Populated.Template.TPDM.yml
workflow_timeout_seconds: 4800
- name: Dispatch EdFi.Ods.Populated.Template.TPDM.PostgreSQL workflow
if: inputs.rebuildLevel == 'DatabaseTemplates'
uses: Codex-/return-dispatch@9a2340d279253061c98206106038aab6ef0be02e #v1.14.0
id: return_dispatch_populated_template_TPDM_postgresql
with:
token: ${{ env.EDFI_ODS_TOKEN }}
ref: ${{ env.current_branch }}
repo: Ed-Fi-ODS
owner: ${{ github.repository_owner }}
workflow: Pkg EdFi.Ods.Populated.Template.TPDM.PostgreSQL.yml
workflow_timeout_seconds: 4800
- name: Dispatch EdFi.Ods.Minimal.Template.TPDM workflow
if: inputs.rebuildLevel == 'DatabaseTemplates'
uses: Codex-/return-dispatch@9a2340d279253061c98206106038aab6ef0be02e #v1.14.0
id: return_dispatch_minimal_template_TPDM
with:
token: ${{ env.EDFI_ODS_TOKEN }}
ref: ${{ env.current_branch }}
repo: Ed-Fi-ODS
owner: ${{ github.repository_owner }}
workflow: Pkg EdFi.Ods.Minimal.Template.TPDM.yml
workflow_timeout_seconds: 4800
- name: Dispatch EdFi.Ods.Minimal.Template.TPDM.PostgreSQL workflow
if: inputs.rebuildLevel == 'DatabaseTemplates'
uses: Codex-/return-dispatch@9a2340d279253061c98206106038aab6ef0be02e #v1.14.0
id: return_dispatch_minimal_template_TPDM_postgresql
with:
token: ${{ env.EDFI_ODS_TOKEN }}
ref: ${{ env.current_branch }}
repo: Ed-Fi-ODS
owner: ${{ github.repository_owner }}
workflow: Pkg EdFi.Ods.Minimal.Template.TPDM.PostgreSQL.yml
workflow_timeout_seconds: 4800
- name: Await to complete the execution for EdFi.Ods.Minimal.Template.TPDM.PostgreSQL RunID ${{ steps.return_dispatch_minimal_template_TPDM_postgresql.outputs.run_id }}
if: inputs.rebuildLevel == 'DatabaseTemplates'
uses: Codex-/await-remote-run@d4a6dbf57245924ff4f23e0db929b8e3ef65486b #v1.12.2
with:
token: ${{ env.EDFI_ODS_TOKEN }}
repo: Ed-Fi-ODS
owner: ${{ github.repository_owner }}
run_id: ${{ steps.return_dispatch_minimal_template_TPDM_postgresql.outputs.run_id }}
run_timeout_seconds: 4800
poll_interval_ms: 5000
- name: Await to complete the execution for EdFi.Ods.Minimal.Template.TPDM RunID ${{ steps.return_dispatch_minimal_template_TPDM.outputs.run_id }}
if: inputs.rebuildLevel == 'DatabaseTemplates'
uses: Codex-/await-remote-run@d4a6dbf57245924ff4f23e0db929b8e3ef65486b #v1.12.2
with:
token: ${{ env.EDFI_ODS_TOKEN }}
repo: Ed-Fi-ODS
owner: ${{ github.repository_owner }}
run_id: ${{ steps.return_dispatch_minimal_template_TPDM.outputs.run_id }}
run_timeout_seconds: 4800
poll_interval_ms: 5000
- name: Await to complete the execution for EdFi.Ods.Populated.Template.TPDM RunID ${{ steps.return_dispatch_populated_template_TPDM.outputs.run_id }}
if: inputs.rebuildLevel == 'DatabaseTemplates'
uses: Codex-/await-remote-run@d4a6dbf57245924ff4f23e0db929b8e3ef65486b #v1.12.2
with:
token: ${{ env.EDFI_ODS_TOKEN }}
repo: Ed-Fi-ODS
owner: ${{ github.repository_owner }}
run_id: ${{ steps.return_dispatch_populated_template_TPDM.outputs.run_id }}
run_timeout_seconds: 4800
poll_interval_ms: 5000
- name: Await to complete the execution for EdFi.Ods.Populated.Template.TPDM.PostgreSQL RunID ${{ steps.return_dispatch_populated_template_TPDM_postgresql.outputs.run_id }}
if: inputs.rebuildLevel == 'DatabaseTemplates'
uses: Codex-/await-remote-run@d4a6dbf57245924ff4f23e0db929b8e3ef65486b #v1.12.2
with:
token: ${{ env.EDFI_ODS_TOKEN }}
repo: Ed-Fi-ODS
owner: ${{ github.repository_owner }}
run_id: ${{ steps.return_dispatch_populated_template_TPDM_postgresql.outputs.run_id }}
run_timeout_seconds: 4800
poll_interval_ms: 5000
- name: Download EdFi.Ods.Minimal.Template.TPDM artifact using Run Id ${{ steps.return_dispatch_minimal_template_TPDM.outputs.run_id }}
if: inputs.rebuildLevel == 'DatabaseTemplates'
uses: dawidd6/action-download-artifact@71072fbb1229e1317f1a8de6b04206afb461bd67 #v3.1.2
with:
workflow: Pkg EdFi.Ods.Minimal.Template.TPDM.yml
workflow_conclusion: success
name: EdFi.Ods.Minimal.Template.TPDM.Core.Artifacts-${{ env.standard_version }}
path: ${{ github.workspace }}/Ed-Fi-ODS-Implementation/NugetPackages/
repo: Ed-Fi-Alliance-OSS/Ed-Fi-ODS
run_id: ${{ steps.return_dispatch_minimal_template_TPDM.outputs.run_id }}
check_artifacts: true
- name: Download EdFi.Ods.Minimal.Template.TPDM.PostgreSQL artifact using Run Id ${{ steps.return_dispatch_minimal_template_TPDM_postgresql.outputs.run_id }}
if: inputs.rebuildLevel == 'DatabaseTemplates'
uses: dawidd6/action-download-artifact@71072fbb1229e1317f1a8de6b04206afb461bd67 #v3.1.2
with:
workflow: Pkg EdFi.Ods.Minimal.Template.TPDM.PostgreSQL.yml
workflow_conclusion: success
name: NugetPackages.Artifacts-${{ env.standard_version }}
path: ${{ github.workspace }}/Ed-Fi-ODS-Implementation/NugetPackages/
repo: Ed-Fi-Alliance-OSS/Ed-Fi-ODS
run_id: ${{ steps.return_dispatch_minimal_template_TPDM_postgresql.outputs.run_id }}
check_artifacts: true
- name: Download EdFi.Ods.Populated.Template.TPDM artifact using Run Id ${{ steps.return_dispatch_populated_template_TPDM.outputs.run_id }}
if: inputs.rebuildLevel == 'DatabaseTemplates'
uses: dawidd6/action-download-artifact@71072fbb1229e1317f1a8de6b04206afb461bd67 #v3.1.2
with:
workflow: Pkg EdFi.Ods.Populated.Template.TPDM.yml
workflow_conclusion: success
name: EdFi.Ods.Populated.Template.TPDM.Core.Artifacts-${{ env.standard_version }}
path: ${{ github.workspace }}/Ed-Fi-ODS-Implementation/NugetPackages/
repo: Ed-Fi-Alliance-OSS/Ed-Fi-ODS
run_id: ${{ steps.return_dispatch_populated_template_TPDM.outputs.run_id }}
check_artifacts: true
- name: Download EdFi.Ods.Populated.Template.TPDM.PostgreSQL artifact using Run Id ${{ steps.return_dispatch_populated_template_TPDM_postgresql.outputs.run_id }}
if: inputs.rebuildLevel == 'DatabaseTemplates'
uses: dawidd6/action-download-artifact@71072fbb1229e1317f1a8de6b04206afb461bd67 #v3.1.2
with:
workflow: Pkg EdFi.Ods.Populated.Template.TPDM.PostgreSQL.yml
workflow_conclusion: success
name: NugetPackages.Artifacts-${{ env.standard_version }}
path: ${{ github.workspace }}/Ed-Fi-ODS-Implementation/NugetPackages/
repo: Ed-Fi-Alliance-OSS/Ed-Fi-ODS
run_id: ${{ steps.return_dispatch_populated_template_TPDM_postgresql.outputs.run_id }}
check_artifacts: true
- name: Update configuration.packages.json with all EdFi.Ods.Minimal.Template.TPDM , EdFi.Ods.Minimal.Template.TPDM.PostgreSQL ,EdFi.Ods.Populated.Template.TPDM ,EdFi.Ods.Populated.Template.TPDM.PostgreSQL new package version
if: inputs.rebuildLevel == 'DatabaseTemplates'
shell: pwsh
run: |
$packageFolder = Get-Item -Path "${{ github.workspace }}/Ed-Fi-ODS-Implementation/NugetPackages/EdFi.Suite3.Ods.Minimal.Template.TPDM.Core.*${{ env.INFORMATIONAL_VERSION }}.*" | Select-Object -Expand Name
$folderParts = $packageFolder -split "\."
$newRevision =$folderParts[$folderParts.Count- 2]
$packageversion = "${{ env.INFORMATIONAL_VERSION }}.$newRevision"
Write-Host "EdFi.Suite3.Ods.Minimal.Template.TPDM latestVersion" $packageversion
Import-Module "./logistics/scripts/modules/settings/settings-management.psm1"
$filePath = "./configuration.packages.json"
$config = Get-Content $filePath | ConvertFrom-Json
$config.packages.'TPDMCoreMinimalTemplate'.PackageVersion = $packageversion
$packageFolder = Get-Item -Path "${{ github.workspace }}/Ed-Fi-ODS-Implementation/NugetPackages/EdFi.Suite3.Ods.Minimal.Template.TPDM.Core.*.PostgreSQL.*${{ env.INFORMATIONAL_VERSION }}.*" | Select-Object -Expand Name
$folderParts = $packageFolder -split "\."
$newRevision =$folderParts[$folderParts.Count- 2]
$packageversion = "${{ env.INFORMATIONAL_VERSION }}.$newRevision"
Write-Host "EdFi.Suite3.Ods.Minimal.Template.TPDM.PostgreSQL latestVersion" $packageversion
$config.packages.'TPDMCorePostgreSqlMinimalTemplate'.PackageVersion = $packageversion
$packageFolder = Get-Item -Path "${{ github.workspace }}/Ed-Fi-ODS-Implementation/NugetPackages/EdFi.Suite3.Ods.Populated.Template.TPDM.Core.*${{ env.INFORMATIONAL_VERSION }}.*" | Select-Object -Expand Name
$folderParts = $packageFolder -split "\."
$newRevision =$folderParts[$folderParts.Count- 2]
$packageversion = "${{ env.INFORMATIONAL_VERSION }}.$newRevision"
Write-Host " EdFi.Suite3.Ods.Populated.Template.TPDM latestVersion" $packageversion
$config.packages.'TPDMCorePopulatedTemplate'.PackageVersion = $packageversion
$packageFolder = Get-Item -Path "${{ github.workspace }}/Ed-Fi-ODS-Implementation/NugetPackages/EdFi.Suite3.Ods.Populated.Template.TPDM.Core.*.PostgreSQL.*${{ env.INFORMATIONAL_VERSION }}.*" | Select-Object -Expand Name
$folderParts = $packageFolder -split "\."
$newRevision =$folderParts[$folderParts.Count- 2]
$packageversion = "${{ env.INFORMATIONAL_VERSION }}.$newRevision"
Write-Host " EdFi.Suite3.Ods.Populated.Template.TPDM.PostgreSQL latestVersion" $packageversion
$config.packages.'TPDMCorePostgreSqlPopulatedTemplate'.PackageVersion = $packageversion
$config | ConvertTo-Json -Depth 10 | Out-File -FilePath $filePath -Encoding UTF8
- name: Add configuration.packages.json
run: |
git add configuration.packages.json
git status
- name: Commit and push updated EdFi.Ods.Minimal.Template.TPDM , EdFi.Ods.Minimal.Template.TPDM.PostgreSQL ,EdFi.Ods.Populated.Template.TPDM ,EdFi.Ods.Populated.Template.TPDM.PostgreSQL new package version
uses: planetscale/ghcommit-action@4131649dbf2fdf1eb34421702972a5af7b0a8731 #v0.1.18
with:
commit_message: "Updating for new EdFi.Ods.Minimal.Template.TPDM , EdFi.Ods.Minimal.Template.TPDM.PostgreSQL ,EdFi.Ods.Populated.Template.TPDM ,EdFi.Ods.Populated.Template.TPDM.PostgreSQL package version"
repo: ${{ github.repository }}
branch: ${{ env.current_branch }}
env:
GITHUB_TOKEN: ${{ secrets.REPO_DISPATCH_TOKEN }}
if: inputs.rebuildLevel == 'DatabaseTemplates'
- name: Upload NugetPackages created using Rebuild Database Templates worfklow
if: success()
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
with:
name: NugetPackages.Artifacts
path: |
${{ github.workspace }}/Ed-Fi-ODS-Implementation/NugetPackages/*.nupkg