Skip to content

Commit 51b1eb8

Browse files
Add dispatch wait for Konflux build and EC tasks to finish (#343)
* vendor source changes Signed-off-by: Michael Valdron <mvaldron@redhat.com> * add wait check on required Konflux tasks before dispatching the community registry Signed-off-by: Michael Valdron <mvaldron@redhat.com> --------- Signed-off-by: Michael Valdron <mvaldron@redhat.com>
1 parent 278d9f4 commit 51b1eb8

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

.github/workflows/pushimage-next.yaml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,21 @@ jobs:
4646
go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@v1.12.4
4747
bash ./build-multi-arch.sh
4848
49-
dispatch:
49+
konflux-wait:
5050
needs: indexServerBuild
51-
strategy:
52-
matrix:
53-
repo: ["devfile/registry"]
5451
runs-on: ubuntu-latest
52+
steps:
53+
- name: Wait for Konflux tasks to finish
54+
uses: lewagon/wait-on-check-action@74049309dfeff245fe8009a0137eacf28136cb3c # v1.5.0
55+
with:
56+
ref: ${{ github.ref }}
57+
check-name: "Red Hat Konflux / devfile-registry-main-enterprise-contract / devfile-registry-base-main"
58+
repo-token: ${{ secrets.GITHUB_TOKEN }}
59+
60+
dispatch-community:
61+
needs: konflux-wait
62+
runs-on: ubuntu-latest
63+
name: Dispatch Community Devfile Registry
5564
steps:
5665
- name: Get the repository name and commit sha
5766
id: get_commit_info
@@ -80,7 +89,7 @@ jobs:
8089
uses: peter-evans/repository-dispatch@v1
8190
with:
8291
token: ${{ secrets.REPO_ACCESS_TOKEN }}
83-
repository: ${{ matrix.repo }}
92+
repository: devfile/registry
8493
event-type: build
8594
client-payload: '{"repo": "${{ steps.get_commit_info.outputs.REPO }}", "sha": "${{ steps.get_commit_info.outputs.SHA }}"}'
8695

0 commit comments

Comments
 (0)