mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-10-29 15:25:01 -04:00
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>
This commit is contained in:
parent
d4c4a90395
commit
5032755c29
23
.github/workflows/docker.yml
vendored
23
.github/workflows/docker.yml
vendored
@ -12,7 +12,7 @@ on:
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository || 'MeshCentral' }}
|
||||
REGISTRY_USERNAME: ${{ github.repository_owner || 'DaanSelen' }}
|
||||
REGISTRY_USERNAME: ${{ github.repository_owner || 'meshcentral-extensions' }}
|
||||
|
||||
jobs:
|
||||
build-images:
|
||||
@ -22,7 +22,7 @@ jobs:
|
||||
contents: read
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
#max-parallel: 3
|
||||
#max-parallel: 1
|
||||
matrix:
|
||||
variant:
|
||||
- name: complete
|
||||
@ -98,6 +98,23 @@ jobs:
|
||||
working-directory: ./translate
|
||||
run: node translate.js translateall
|
||||
|
||||
- name: process tags with suffix
|
||||
id: clean-tag
|
||||
run: |
|
||||
SUFFIX="${{ matrix.variant.tag_suffix }}"
|
||||
# Read each line into an array
|
||||
mapfile -t TAGS <<< "${{ steps.meta.outputs.tags }}"
|
||||
|
||||
RESULT=""
|
||||
for tag in "${TAGS[@]}"; do
|
||||
if [ -n "$RESULT" ]; then
|
||||
RESULT+=","
|
||||
fi
|
||||
RESULT+="${tag}${SUFFIX}"
|
||||
done
|
||||
|
||||
echo "TAGS_WITH_SUFFIX=$RESULT" >> $GITHUB_ENV
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
@ -105,7 +122,7 @@ jobs:
|
||||
file: docker/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v6,linux/arm/v7
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}${{ matrix.variant.tag_suffix }}
|
||||
tags: ${{ env.TAGS_WITH_SUFFIX }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
annotations: ${{ steps.meta.outputs.annotations }}
|
||||
build-args: |
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user