Skip to content

Commit 5dd9a16

Browse files
authored
[ODS-6577] 'Publish to Docker Hub' gets executed even if 'InitDev Package' fails (#1196)
1 parent a1c6e70 commit 5dd9a16

File tree

3 files changed

+35
-16
lines changed

3 files changed

+35
-16
lines changed

.github/workflows/Docker Test.yml

+10-1
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,16 @@ env:
2929
PACKAGE_VERSION: "7.4"
3030

3131
jobs:
32+
assert-all-required-workflows-succeeded:
33+
runs-on: ubuntu-24.04
34+
steps:
35+
- uses: ahmadnassri/action-workflow-run-wait@2aa3d9e1a12ecaaa9908e368eaf2123bb084323e #v1.4.4
36+
with:
37+
timeout: 1800000
38+
delay: 10000
39+
3240
docker-lint:
33-
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
41+
needs: assert-all-required-workflows-succeeded
3442
runs-on: ubuntu-24.04
3543
strategy:
3644
matrix:
@@ -57,6 +65,7 @@ jobs:
5765
dockerfile: Docker/${{ matrix.image }}/Dockerfile
5866

5967
FindStandardAndExtensionVersions:
68+
needs: assert-all-required-workflows-succeeded
6069
uses: Ed-Fi-Alliance-OSS/Ed-Fi-ODS/.github/workflows/Find Standard and Extension Versions.yml@874b608a0f3a14243e0035dd1222169fafcbe8d3
6170
with:
6271
calling_branch: ${{ github.head_ref || github.ref_name }}

.github/workflows/Publish to Azure Artifacts.yml

+13-15
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,6 @@ name: Publish to Azure Artifacts
77

88
on:
99
workflow_dispatch:
10-
inputs:
11-
timeout:
12-
description: "Timeout before we stop trying (in milliseconds) for action-workflow-run-wait step"
13-
required: true
14-
default: '1800000'
15-
delay:
16-
description: "delay between status checks (in milliseconds) for action-workflow-run-wait step"
17-
required: true
18-
default: '10000'
1910

2011
workflow_run:
2112
workflows: ["InitDev, Smoke Tests", "InitDev, Unit tests, Integration tests, Package", "InitDev, MultiTenancy"]
@@ -25,6 +16,10 @@ on:
2516

2617
permissions: read-all
2718

19+
concurrency:
20+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
21+
cancel-in-progress: true
22+
2823
env:
2924
AZURE_ARTIFACT_URL: "https://pkgs.dev.azure.com/ed-fi-alliance/Ed-Fi-Alliance-OSS/_packaging/EdFi/nuget/v3/index.json"
3025
AZURE_ARTIFACT_NUGET_KEY: ${{ secrets.AZURE_ARTIFACTS_PERSONAL_ACCESS_TOKEN }}
@@ -33,15 +28,23 @@ env:
3328
REPOSITORY_OWNER: ${{ GITHUB.REPOSITORY_OWNER }}
3429

3530
jobs:
31+
assert-all-required-workflows-succeeded:
32+
runs-on: ubuntu-24.04
33+
steps:
34+
- uses: ahmadnassri/action-workflow-run-wait@2aa3d9e1a12ecaaa9908e368eaf2123bb084323e #v1.4.4
35+
with:
36+
timeout: 1800000
37+
delay: 10000
38+
3639
FindStandardAndExtensionVersions:
40+
needs: assert-all-required-workflows-succeeded
3741
uses: Ed-Fi-Alliance-OSS/Ed-Fi-ODS/.github/workflows/Find Standard and Extension Versions.yml@874b608a0f3a14243e0035dd1222169fafcbe8d3
3842
with:
3943
calling_branch: ${{ github.head_ref || github.ref_name }}
4044

4145
build:
4246

4347
runs-on: ubuntu-24.04
44-
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
4548
needs: FindStandardAndExtensionVersions
4649

4750
strategy:
@@ -55,11 +58,6 @@ jobs:
5558
with:
5659
repository: Ed-Fi-Alliance-OSS/Ed-Fi-ODS-Implementation
5760
path: Ed-Fi-ODS-Implementation/
58-
- name: Wait for ["InitDev, Smoke Tests", "InitDev, Unit tests, Integration tests, Package", "InitDev, MultiTenancy"] workflows to Complete
59-
uses: ahmadnassri/action-workflow-run-wait@2aa3d9e1a12ecaaa9908e368eaf2123bb084323e #v1.4.4
60-
with:
61-
timeout: ${{inputs.timeout}}
62-
delay: ${{inputs.delay}}
6361
- name: Check for Azure token
6462
if: ${{ env.REPOSITORY_OWNER == 'Ed-Fi-Alliance-OSS' && env.AZURE_ARTIFACT_NUGET_KEY == '' }}
6563
run: |

.github/workflows/Publish to Docker Hub.yml

+12
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ on:
2424

2525
permissions: read-all
2626

27+
concurrency:
28+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
29+
cancel-in-progress: true
30+
2731
env:
2832
DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }}
2933
DOCKER_USERNAME: ${{ vars.DOCKER_USERNAME }}
@@ -35,8 +39,16 @@ env:
3539
BASE_BRANCH: ${{ GITHUB.HEAD_REF || GITHUB.REF_NAME }}
3640

3741
jobs:
42+
assert-all-required-workflows-succeeded:
43+
runs-on: ubuntu-24.04
44+
steps:
45+
- uses: ahmadnassri/action-workflow-run-wait@2aa3d9e1a12ecaaa9908e368eaf2123bb084323e #v1.4.4
46+
with:
47+
timeout: 1800000
48+
delay: 10000
3849

3950
FindStandardAndExtensionVersions:
51+
needs: assert-all-required-workflows-succeeded
4052
uses: Ed-Fi-Alliance-OSS/Ed-Fi-ODS/.github/workflows/Find Standard and Extension Versions.yml@874b608a0f3a14243e0035dd1222169fafcbe8d3
4153
with:
4254
calling_branch: ${{ github.head_ref || github.ref_name }}

0 commit comments

Comments
 (0)