Skip to content

Commit 1605db2

Browse files
committed
ci: Build and push images only if tests succeed
Signed-off-by: Phoevos Kalemkeris <[email protected]>
1 parent 8d1d3b8 commit 1605db2

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
push:
55
branches:
66
- main
7+
tags:
8+
- "v*.*.*"
79
pull_request:
810

911
jobs:

.github/workflows/docker.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
name: Build and push Docker images
22

33
on:
4-
push:
5-
branches:
6-
- main
7-
tags:
8-
- "v*.*.*"
4+
workflow_run:
5+
workflows:
6+
- "Python tests"
7+
types:
8+
- completed
99
workflow_dispatch:
1010

1111
env:
@@ -14,6 +14,9 @@ env:
1414
jobs:
1515
build-and-push:
1616
runs-on: ubuntu-latest
17+
if: |
18+
github.event_name == 'workflow_dispatch' ||
19+
github.event.workflow_run.conclusion == 'success'
1720
permissions:
1821
contents: read
1922
packages: write

0 commit comments

Comments
 (0)