chore: Isolate companion build (#25985)
* Isolate companion build * Fix typo * Update .github/workflows/pr.yml * Improve branch protection * integration tests missing * fix typo * fix to only have required * fix to only have required * fix to only have required * adjust to keep as before --------- Co-authored-by: Peer Richelsen <peeroke@gmail.com>
This commit is contained in:
co-authored by
Peer Richelsen
parent
e6d0253950
commit
e84550ba76
@@ -24,6 +24,7 @@ jobs:
|
||||
pull-requests: read
|
||||
outputs:
|
||||
has-files-requiring-all-checks: ${{ steps.filter.outputs.has-files-requiring-all-checks }}
|
||||
has_companion: ${{ steps.filter.outputs.has_companion }}
|
||||
commit-sha: ${{ steps.get_sha.outputs.commit-sha }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -33,7 +34,9 @@ jobs:
|
||||
with:
|
||||
filters: |
|
||||
has-files-requiring-all-checks:
|
||||
- "!(**.md|**.mdx|.github/CODEOWNERS|docs/**|help/**|apps/web/public/static/locales/**/common.json|i18n.lock)"
|
||||
- "!(companion/**|**.md|**.mdx|.github/CODEOWNERS|docs/**|help/**|apps/web/public/static/locales/**/common.json|i18n.lock)"
|
||||
has_companion:
|
||||
- "companion/**"
|
||||
- name: Get Latest Commit SHA
|
||||
id: get_sha
|
||||
run: |
|
||||
@@ -148,8 +151,8 @@ jobs:
|
||||
|
||||
build-companion:
|
||||
name: Companion builds
|
||||
needs: [changes, check-label, deps]
|
||||
if: ${{ needs.check-label.outputs.run-e2e == 'true' && needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
|
||||
needs: [changes, check-label]
|
||||
if: needs.changes.outputs.has_companion == 'true'
|
||||
uses: ./.github/workflows/companion-build.yml
|
||||
secrets: inherit
|
||||
|
||||
@@ -256,11 +259,23 @@ jobs:
|
||||
e2e-api-v2,
|
||||
e2e-embed,
|
||||
e2e-embed-react,
|
||||
e2e-app-store
|
||||
e2e-app-store,
|
||||
]
|
||||
if: always()
|
||||
runs-on: buildjet-2vcpu-ubuntu-2204
|
||||
steps:
|
||||
- name: fail if conditional jobs failed
|
||||
if: needs.changes.outputs.has-files-requiring-all-checks == 'true' && (contains(needs.*.result, 'failure') || contains(needs.*.result, 'skipped') || contains(needs.*.result, 'cancelled'))
|
||||
run: exit 1
|
||||
if: |
|
||||
(
|
||||
needs.changes.outputs.has-files-requiring-all-checks == 'true' &&
|
||||
(
|
||||
contains(needs.*.result, 'failure') ||
|
||||
contains(needs.*.result, 'cancelled') ||
|
||||
contains(needs.*.result, 'skipped')
|
||||
)
|
||||
) ||
|
||||
(
|
||||
needs.changes.outputs.has_companion == 'true' &&
|
||||
needs.build-companion.result != 'success'
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user