From bb326c2c65efb384184c5714d4e780e68f614134 Mon Sep 17 00:00:00 2001 From: Jaymala Sinha Date: Thu, 6 Apr 2023 12:11:39 -0400 Subject: [PATCH] [QT-517] Test required workflow for docs Signed-off-by: Jaymala Sinha --- .github/workflows/build.yml | 17 ++++++++++++---- .../tests-completed-successfully.yml | 20 +++++++++++++++++++ 2 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/tests-completed-successfully.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 247a8d2abfe3e..ba09b00180eef 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,6 +11,10 @@ on: jobs: product-metadata: + # Do not run for docs branches + if: | + !startsWith(github.head_ref, 'docs/') && + !startsWith(github.head_ref, 'backport/docs/') runs-on: ubuntu-latest outputs: build-date: ${{ steps.get-metadata.outputs.build-date }} @@ -203,8 +207,7 @@ jobs: artifact-version: ${{ needs.product-metadata.outputs.vault-version }} secrets: inherit - completed-successfully: - runs-on: ubuntu-latest + builds-completed-successfully: needs: - build-other - build-linux @@ -213,5 +216,11 @@ jobs: - build-ubi - test - test-docker-k8s - steps: - - run: echo "All required build and test workflows have succeeded!" + uses: ./.github/workflows/tests-completed-successfully.yml + + docs-completed-successfully: + # Run only for docs branches + if: | + startsWith(github.head_ref, 'docs/') && + startsWith(github.head_ref, 'backport/docs/') + uses: ./.github/workflows/tests-completed-successfully.yml diff --git a/.github/workflows/tests-completed-successfully.yml b/.github/workflows/tests-completed-successfully.yml new file mode 100644 index 0000000000000..b16fdf97adda1 --- /dev/null +++ b/.github/workflows/tests-completed-successfully.yml @@ -0,0 +1,20 @@ +--- +name: completed-successfully + +on: + workflow_call: + +jobs: + completed-successfully: + runs-on: ubuntu-latest + steps: + # Do not run for docs branches + if: | + !startsWith(github.head_ref, 'docs/') && + !startsWith(github.head_ref, 'backport/docs/') + run: echo "All required build and test workflows have succeeded!" + + if: | + startsWith(github.head_ref, 'docs/') && + startsWith(github.head_ref, 'backport/docs/') + run: echo "Docs workflows succeeded!"