File tree 2 files changed +21
-2
lines changed 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change 7
7
description : ' Whether to push the Docker image'
8
8
required : true
9
9
type : boolean
10
+ release :
11
+ description : ' Whether to push as latest release'
12
+ required : false
13
+ default : false
14
+ type : boolean
10
15
version :
11
16
description : ' Version to use'
12
17
required : false
18
23
description : ' Whether to push the Docker image'
19
24
required : true
20
25
type : boolean
26
+ release :
27
+ description : ' Whether to push as latest release'
28
+ required : false
29
+ default : false
30
+ type : boolean
21
31
version :
22
32
description : ' Version to use'
23
33
required : false
24
34
default : ' '
25
35
type : string
26
36
27
37
jobs :
38
+ docker-vars :
39
+ runs-on : ubuntu-latest
40
+ outputs :
41
+ version : ${{ inputs.version || format('{0}-{1}', github.sha, env.COMMIT_TIMESTAMP) }}
42
+ steps :
43
+ - name : Get Git commit timestamps
44
+ run : echo "COMMIT_TIMESTAMP=$(git log -1 --pretty=%ct)" >> $GITHUB_ENV
45
+ - run : echo "Exposing env vars"
28
46
docker :
29
47
runs-on : ubuntu-latest
30
48
steps :
64
82
load : true
65
83
push : ${{ inputs.push }}
66
84
tags : |
67
- ${{ inputs.push && format('{0}/altairgraphqlapi:latest', secrets.DOCKERHUB_USERNAME) || '' }}
85
+ ${{ inputs.push && inputs.release && format('{0}/altairgraphqlapi:latest', secrets.DOCKERHUB_USERNAME) || '' }}
68
86
${{ inputs.push && inputs.version && format('{0}/altairgraphqlapi:{1}', secrets.DOCKERHUB_USERNAME, inputs.version) || '' }}
69
- ${{ inputs.push && format('ghcr.io/{0}/altairgraphqlapi:latest', github.repository_owner) || '' }}
87
+ ${{ inputs.push && inputs.release && format('ghcr.io/{0}/altairgraphqlapi:latest', github.repository_owner) || '' }}
70
88
${{ inputs.push && inputs.version && format('ghcr.io/{0}/altairgraphqlapi:{1}', github.repository_owner, inputs.version) || '' }}
Original file line number Diff line number Diff line change 42
42
uses : ./.github/workflows/_push-docker.yml
43
43
with :
44
44
push : true
45
+ release : true
45
46
version : ${{ needs.prepare-release.outputs.release-tag }}
46
47
secrets : inherit
47
48
You can’t perform that action at this time.
0 commit comments