Commit 3347d17 1 parent ae036ab commit 3347d17 Copy full SHA for 3347d17
File tree 3 files changed +18
-25
lines changed
3 files changed +18
-25
lines changed Original file line number Diff line number Diff line change 11
11
workflow_dispatch :
12
12
13
13
jobs :
14
- container_build_and_test_job :
15
- if : github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
16
- runs-on : ubuntu-latest
17
- name : container build ⚙️
18
- steps :
19
- - name : Checkout repository
20
- uses : actions/checkout@v4
21
-
22
- # Build and push Docker image with Buildx (don't push on PR)
23
- # https://github.com/docker/build-push-action
24
- - name : Build and push Docker image
25
- uses : docker/build-push-action@v6
26
- with :
27
- context : ./
28
- push : false
14
+ container-build :
15
+ uses : ./.github/workflows/shared-build-and-deploy.yaml
16
+ with :
17
+ deploy : false
18
+ secrets : inherit
Original file line number Diff line number Diff line change 7
7
- main
8
8
# Publish semver tags as releases.
9
9
tags : ["v*.*.*"]
10
- pull_request :
11
- branches :
12
- - main
10
+ # pull_request:
11
+ # branches:
12
+ # - main
13
13
workflow_dispatch :
14
14
15
15
# env:
21
21
jobs :
22
22
build-and-deploy :
23
23
uses : ./.github/workflows/shared-build-and-deploy.yaml
24
+ with :
25
+ deploy : true
24
26
secrets : inherit
25
27
# build:
26
28
# runs-on: ubuntu-latest
Original file line number Diff line number Diff line change 1
1
on :
2
2
workflow_call :
3
- # inputs:
4
- # config-path :
5
- # required: true
6
- # type: string
3
+ inputs :
4
+ deploy :
5
+ required : true
6
+ type : boolean
7
7
# secrets:
8
8
# personal_access_token:
9
9
# required: true
41
41
# Login against a Docker registry except on PR
42
42
# https://github.com/docker/login-action
43
43
- name : Log into registry ${{ env.REGISTRY }}
44
- if : github.event_name != 'pull_request'
44
+ # if: github.event_name != 'pull_request'
45
45
uses : docker/login-action@v3
46
46
with :
47
47
registry : ${{ env.REGISTRY }}
@@ -69,13 +69,14 @@ jobs:
69
69
uses : docker/build-push-action@v6
70
70
with :
71
71
context : ./
72
- push : ${{ github.event_name != 'pull_request' }}
72
+ # push: ${{ github.event_name != 'pull_request' }}
73
+ push : ${{ inputs.deploy }}
73
74
tags : ${{ steps.meta.outputs.tags }}
74
75
labels : ${{ steps.meta.outputs.labels }}
75
76
76
77
deploy :
77
78
runs-on : ubuntu-latest
78
- if : github.event_name != 'pull_request'
79
+ if : inputs.deploy == true
79
80
needs : [build]
80
81
permissions :
81
82
id-token : write
You can’t perform that action at this time.
0 commit comments