Skip to content

Commit ce1d210

Browse files
author
Alex J Lennon
committed
Fix build workflow to depend on tests workflow completion
1 parent 89f3bea commit ce1d210

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

.github/workflows/build.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
name: Build Package
22

33
on:
4+
workflow_run:
5+
workflows: ["Tests"]
6+
types:
7+
- completed
48
push:
5-
branches: [main]
69
tags:
710
- 'v*'
8-
pull_request:
9-
branches: [main]
1011
workflow_dispatch:
1112

1213
jobs:
1314
build:
1415
runs-on: ubuntu-latest
15-
# Only build if tests workflow passes
16-
# Note: This requires the Tests workflow to complete successfully first
16+
# Only build if tests workflow passed (for workflow_run trigger)
17+
# For tags and manual dispatch, build anyway (tests should be run separately)
18+
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name != 'workflow_run' }}
1719

1820
steps:
1921
- uses: actions/checkout@v4

0 commit comments

Comments
 (0)