Skip to content

Commit 407374a

Browse files
authored
updated post_push to generate manifest dynamically (#124)
- Takes the git-version tag at runtime to generate the correct tags
1 parent 448fe6d commit 407374a

File tree

2 files changed

+34
-26
lines changed

2 files changed

+34
-26
lines changed

scripts/dockerfiles/hooks/post_push

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,38 @@
66
curl -Lo manifest-tool https://github.com/estesp/manifest-tool/releases/download/v0.9.0/manifest-tool-linux-amd64
77
chmod +x manifest-tool
88

9+
git_tag=$(git describe --abbrev=0 --tags)
10+
IFS=. read major minor bugfix <<EOF
11+
${git_tag##*v}
12+
EOF
13+
14+
cat <<EOF > multi-arch-manifest.yaml
15+
image: subspacecommunity/subspace
16+
tags: ['${major}.${minor}.${bugfix}', '${major}.${minor}', '${major}']
17+
manifests:
18+
- image: subspacecommunity/subspace:amd64
19+
platform:
20+
architecture: amd64
21+
os: linux
22+
- image: subspacecommunity/subspace:386
23+
platform:
24+
architecture: 386
25+
os: linux
26+
- image: subspacecommunity/subspace:arm32v6
27+
platform:
28+
architecture: arm
29+
os: linux
30+
variant: v6
31+
- image: subspacecommunity/subspace:arm32v7
32+
platform:
33+
architecture: arm
34+
os: linux
35+
variant: v7
36+
- image: subspacecommunity/subspace:arm64v8
37+
platform:
38+
architecture: arm64
39+
os: linux
40+
variant: v8
41+
EOF
42+
943
./manifest-tool push from-spec multi-arch-manifest.yaml

scripts/dockerfiles/multi-arch-manifest.yaml

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)