@@ -51,17 +51,13 @@ jobs:
51
51
strategy :
52
52
matrix :
53
53
args :
54
- - package : base-node
55
- context : .
54
+ - context : .
56
55
image : ghcr.io/unkhz/ruuvipuserrin-base-node
57
- kustomization : ./packages/base-node/.khz-k3s/kustomization.yaml
58
56
59
57
uses : ./.github/workflows/build-package.yml
60
58
with :
61
- package : ${{ matrix.args.package }}
62
59
context : ${{ matrix.args.context }}
63
60
image : ${{ matrix.args.image }}
64
- kustomization : ${{ matrix.args.kustomization }}
65
61
66
62
build-package-images :
67
63
if : ${{ ! endsWith(github.event.head_commit.message, '[skip ci]') }}
@@ -73,14 +69,36 @@ jobs:
73
69
strategy :
74
70
matrix :
75
71
args :
76
- - package : archive
77
- context : ./packages/archive
72
+ - context : ./packages/archive
78
73
image : ghcr.io/unkhz/ruuvipuserrin-archive
79
- kustomization : ./packages/archive/.khz-k3s/kustomization.yaml
80
74
81
75
uses : ./.github/workflows/build-package.yml
82
76
with :
83
- package : ${{ matrix.args.package }}
84
77
context : ${{ matrix.args.context }}
85
78
image : ${{ matrix.args.image }}
86
- kustomization : ${{ matrix.args.kustomization }}
79
+
80
+ update-version-tags :
81
+ if : ${{ ! endsWith(github.event.head_commit.message, '[skip ci]') }}
82
+ runs-on : ubuntu-latest
83
+ needs : build-package-images
84
+
85
+ strategy :
86
+ matrix :
87
+ kustomization :
88
+ - ./packages/base-node/.khz-k3s/kustomization.yaml
89
+ - ./packages/archive/.khz-k3s/kustomization.yaml
90
+
91
+ steps :
92
+ - name : Install yq
93
+ uses : mikefarah/yq@master
94
+ with :
95
+ cmd : yq --version
96
+
97
+ - name : Update image version tag
98
+ run : |
99
+ git config --global user.email "juhani.pelli@gmail.com"
100
+ git config --global user.name "Juhani Pelli"
101
+ yq e '.images[0].newTag = "${{ github.sha }}"' -i ${{ matrix.kustomization }}
102
+ git add ${{ matrix.kustomization }}
103
+ git commit -m "Deploy ${{ github.sha }} [skip ci]"
104
+ git push origin ${{ github.event.repository.default_branch }}
0 commit comments