Skip to content

Commit

Permalink
[QT-353] Use a different approach to branch restrictions (#17998) (#1…
Browse files Browse the repository at this point in the history
…8059)

Create a new workflow job that is only triggered when all build and
integration workflows have completed. This will allow us to require
branch restrictions on a single workflow.

Of note, we tried to allow docs branches to bypass testing using the
method suggested by Github[0], however, the `branches-ignore`
functionality did not work for the `pull_request` event type. Therefore,
bypassing build and integration workflows for docs branches is no longer
supported.

[0] https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks

Signed-off-by: Ryan Cragun <me@ryan.ec>
  • Loading branch information
ryancragun committed Nov 19, 2022
1 parent 4751e89 commit 79cc894
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 59 deletions.
20 changes: 0 additions & 20 deletions .github/workflows/build-docs.yml

This file was deleted.

32 changes: 0 additions & 32 deletions .github/workflows/build-ensure-success.yml

This file was deleted.

21 changes: 14 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
---
name: build

on:
workflow_dispatch:
pull_request:
types:
- opened
- reopened
- synchronize
branches-ignore:
- docs/**
- backport/docs/**
push:
branches:
- main
Expand Down Expand Up @@ -200,3 +194,16 @@ jobs:
artifact-revision: ${{ needs.product-metadata.outputs.vault-revision }}
artifact-version: ${{ needs.product-metadata.outputs.vault-version }}
secrets: inherit

completed-successfully:
runs-on: ubuntu-latest
needs:
- build-other
- build-linux
- build-darwin
- build-docker
- build-ubi
- enos
- enos-docker-k8s
steps:
- run: echo "All build and integration workflows have succeeded!"

0 comments on commit 79cc894

Please sign in to comment.