Skip to content

Commit

Permalink
[QT-517] Test required workflow for docs
Browse files Browse the repository at this point in the history
Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>
  • Loading branch information
Jaymala Sinha committed Apr 6, 2023
1 parent fa5f0e6 commit bb326c2
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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
Expand All @@ -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
20 changes: 20 additions & 0 deletions .github/workflows/tests-completed-successfully.yml
Original file line number Diff line number Diff line change
@@ -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!"

0 comments on commit bb326c2

Please sign in to comment.