File tree 2 files changed +40
-4
lines changed
2 files changed +40
-4
lines changed Original file line number Diff line number Diff line change 12
12
- name : Checkout
13
13
uses : actions/checkout@v2
14
14
- name : Build images
15
+ env :
16
+ zsh_tags : |
17
+ master
18
+ 5.9
19
+ 5.8.1
20
+ 5.8
21
+ 5.7.1
22
+ 5.7
23
+ 5.6.2
24
+ 5.6.1
25
+ 5.6
26
+ 5.5.1
27
+ 5.5
28
+ 5.4.2
29
+ 5.4.1
30
+ 5.4
31
+ 5.3.1
32
+ 5.3
33
+ 5.2
34
+ 5.1.1
35
+ 5.1
36
+ 5.0.8
37
+ 5.0.7
38
+ 5.0.6
39
+ 5.0.5
40
+ 5.0.4
41
+ 5.0.3
42
+ 5.0.2
43
+ 5.0.1
44
+ 5.0.0
45
+ 4.3.17
46
+ 4.3.16
47
+ 4.3.15
48
+ 4.3.14
49
+ 4.3.13
50
+ 4.3.12
51
+ 4.3.11
15
52
run : |
16
53
for image in */Dockerfile; do
17
54
image="$(basename $(dirname $image))"
Original file line number Diff line number Diff line change @@ -8,14 +8,13 @@ USERNAME="$1"
8
8
# Get image from directory name
9
9
IMAGE=" $( basename " $( pwd) " ) "
10
10
11
- # List of published zshusers/zsh Docker images
12
- versions=" $( wget -qO- https://registry.hub.docker.com/v1/repositories/zshusers/zsh/tags | sed ' s/[^0-9.]*"name": "\([^"]*\)"[^0-9.]*/\n\1\n/g;s/^\n//' ) "
11
+ # $zsh_tags is an environment variable passed via secrets
13
12
14
13
# Build images
15
- for version in $versions ; do
14
+ for version in $zsh_tags ; do
16
15
docker buildx build -t " $USERNAME /$IMAGE :$version " --build-arg ZSH_VERSION=" $version " .
17
16
done
18
17
19
18
# Tag latest image
20
- latest=$( tr ' ' ' \n' <<< " $versions " | sed ' /^$/d' | sort -V | tail -2 | head -1)
19
+ latest=$( tr ' ' ' \n' <<< " $zsh_tags " | sed ' /^$/d' | sort -V | tail -2 | head -1)
21
20
docker tag " $USERNAME /$IMAGE :$latest " " $USERNAME /$IMAGE :latest"
You can’t perform that action at this time.
0 commit comments