fix: workflow again where every tag is given. (#7293)

* Workflow split (#14) * Made the workflow build multiple images for simplicity * New method * Trying workflow * Finalize * Reset package files to upstream/master * Edit workflow according to @si458 * Whoops accidentally removed these. Back again. * Testing out embedded tokens * Workflow split (#12) * Made the workflow build multiple images for simplicity * New method * Trying workflow * Finalize * Reset package files to upstream/master * Edit workflow according to @si458 * Whoops accidentally removed these. Back again. * Testing out embedded tokens --------- Co-authored-by: Daan Selen <dselen@systemec.nl> * Why the flip do we even use that??? * Testing out suggestions of permissions * Testing fallback. * Remove fallback * Minor removal of comment --------- Co-authored-by: Daan Selen <dselen@systemec.nl> * fix: workflow like we want --------- Co-authored-by: Daan Selen <dselen@systemec.nl>

DaanSelen committed Sep 24, 2025 at 21:51 UTC 5032755c2971955161105922e723461385a6c874
1 file changed +20 -3
.github/workflows/docker.yml
+20 -3
@@ -12,7 +12,7 @@ on:
12 env:
13 REGISTRY: ghcr.io
14 IMAGE_NAME: ${{ github.repository || 'MeshCentral' }}
15 - REGISTRY_USERNAME: ${{ github.repository_owner || 'DaanSelen' }}
15 + REGISTRY_USERNAME: ${{ github.repository_owner || 'meshcentral-extensions' }}
16
17 jobs:
18 build-images:
@@ -22,7 +22,7 @@ jobs:
22 contents: read
23 runs-on: ubuntu-latest
24 strategy:
25 - #max-parallel: 3
25 + #max-parallel: 1
26 matrix:
27 variant:
28 - name: complete
@@ -98,6 +98,23 @@ jobs:
98 working-directory: ./translate
99 run: node translate.js translateall
100
101 + - name: process tags with suffix
102 + id: clean-tag
103 + run: |
104 + SUFFIX="${{ matrix.variant.tag_suffix }}"
105 + # Read each line into an array
106 + mapfile -t TAGS <<< "${{ steps.meta.outputs.tags }}"
107 +
108 + RESULT=""
109 + for tag in "${TAGS[@]}"; do
110 + if [ -n "$RESULT" ]; then
111 + RESULT+=","
112 + fi
113 + RESULT+="${tag}${SUFFIX}"
114 + done
115 +
116 + echo "TAGS_WITH_SUFFIX=$RESULT" >> $GITHUB_ENV
117 +
118 - name: Build and push Docker image
119 uses: docker/build-push-action@v6
120 with:
@@ -105,7 +122,7 @@ jobs:
122 file: docker/Dockerfile
123 platforms: linux/amd64,linux/arm64,linux/arm/v6,linux/arm/v7
124 push: true
108 - tags: ${{ steps.meta.outputs.tags }}${{ matrix.variant.tag_suffix }}
125 + tags: ${{ env.TAGS_WITH_SUFFIX }}
126 labels: ${{ steps.meta.outputs.labels }}
127 annotations: ${{ steps.meta.outputs.annotations }}
128 build-args: |