Skip to content

Commit 6e0c491

Browse files
committed
Only build/push docker image manually from develop
1 parent 5c13213 commit 6e0c491

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ on:
1212
branches:
1313
- master
1414
- develop
15+
workflow_dispatch:
16+
inputs:
17+
push_docker:
18+
description: 'Build and push Docker image'
19+
required: false
20+
type: boolean
21+
default: true
1522

1623
env:
1724
DOTNET_VERSION: '8.0.x'
@@ -88,8 +95,9 @@ jobs:
8895
build-docker:
8996
name: Build and Push Docker Image
9097
runs-on: ubuntu-latest
91-
needs: build-windows
92-
if: (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop') && github.event_name == 'push'
98+
if: |
99+
github.event_name == 'workflow_dispatch' ||
100+
(github.ref == 'refs/heads/master' && github.event_name == 'push')
93101
permissions:
94102
contents: read
95103
packages: write

0 commit comments

Comments
 (0)