Skip to content

Commit 96bac76

Browse files
committed
Commit only once
1 parent 33cefea commit 96bac76

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

.github/workflows/master.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,24 +81,27 @@ jobs:
8181
if: ${{ ! endsWith(github.event.head_commit.message, '[skip ci]') }}
8282
runs-on: ubuntu-latest
8383
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-
9184
steps:
85+
- name: Checkout repository
86+
uses: actions/checkout@v4
87+
9288
- name: Install yq
9389
uses: mikefarah/yq@master
9490
with:
9591
cmd: yq --version
9692

97-
- name: Update image version tag
93+
- name: Update version tags
9894
run: |
95+
function update_version_tag() {
96+
file=$1
97+
yq e '.images[0].newTag = "${{ github.sha }}"' -i $file
98+
git add $file
99+
}
100+
101+
update_version_tag ./packages/base-node/.khz-k3s/kustomization.yaml
102+
update_version_tag ./packages/archive/.khz-k3s/kustomization.yaml
103+
99104
git config --global user.email "juhani.pelli@gmail.com"
100105
git config --global user.name "Juhani Pelli"
101-
yq e '.images[0].newTag = "${{ github.sha }}"' -i ${{ matrix.kustomization }}
102-
git add ${{ matrix.kustomization }}
103106
git commit -m "Deploy ${{ github.sha }} [skip ci]"
104107
git push origin ${{ github.event.repository.default_branch }}

0 commit comments

Comments
 (0)