File tree 3 files changed +36
-18
lines changed
3 files changed +36
-18
lines changed Original file line number Diff line number Diff line change @@ -7,30 +7,17 @@ inputs:
7
7
latest :
8
8
description : if tag latest
9
9
required : false
10
+ latest_major :
11
+ description : if tag latest major version
12
+ required : false
10
13
runs :
11
14
using : " composite"
12
15
steps :
13
16
- name : Build image
14
17
env :
15
18
VERSION : ${{ inputs.version }}
16
19
LATEST : ${{ inputs.latest }}
20
+ LATEST_MAJOR : ${{ inputs.latest_major }}
17
21
run : |
18
- if [[ "${GITHUB_REF}" == refs/heads/master || "${GITHUB_REF}" == refs/tags/* ]]; then
19
- minor_ver="${VERSION%.*}"
20
- major_ver="${minor_ver%.*}"
21
-
22
- tags=("${minor_ver}" "${major_ver}")
23
- if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
24
- stability_tag=("${GITHUB_REF##*/}")
25
- tags=("${minor_ver}-${stability_tag}" "${major_ver}-${stability_tag}")
26
- else
27
- if [[ -n "${LATEST}" ]]; then
28
- tags+=("latest")
29
- fi
30
- fi
31
-
32
- for tag in "${tags[@]}"; do
33
- make buildx-imagetools-create TAG=${tag}
34
- done
35
- fi
22
+ . $GITHUB_ACTION_PATH/release.sh
36
23
shell : bash
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -exo pipefail
4
+
5
+ if [[ " ${GITHUB_REF} " == refs/heads/master || " ${GITHUB_REF} " == refs/tags/* ]]; then
6
+ minor_ver=" ${VERSION% .* } "
7
+ major_ver=" ${minor_ver% .* } "
8
+
9
+ tags=(" ${minor_ver} " )
10
+
11
+ if [[ -n " ${LATEST_MAJOR} " ]]; then
12
+ tags+=(" ${major_ver} " )
13
+ fi
14
+
15
+ if [[ " ${GITHUB_REF} " == refs/tags/* ]]; then
16
+ stability_tag=(" ${GITHUB_REF##*/ } " )
17
+ tags=(" ${minor_ver} -${stability_tag} " )
18
+ if [[ -n " ${LATEST_MAJOR} " ]]; then
19
+ tags+=(" ${major_ver} -${stability_tag} " )
20
+ fi
21
+ else
22
+ if [[ -n " ${LATEST} " ]]; then
23
+ tags+=(" latest" )
24
+ fi
25
+ fi
26
+
27
+ for tag in " ${tags[@]} " ; do
28
+ make buildx-imagetools-create TAG=${tag}
29
+ done
30
+ fi
Original file line number Diff line number Diff line change 58
58
with :
59
59
version : ${{ env.VARNISH60 }}
60
60
latest : true
61
+ latest_major : true
You can’t perform that action at this time.
0 commit comments