ci: fix tag syntax (#124)

This commit is contained in:
Tim Brust 2020-12-14 11:30:17 +00:00 committed by GitHub
parent a8aaa1ee87
commit 938de13da0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,19 +8,19 @@ on:
jobs: jobs:
buildx: buildx:
runs-on: ubuntu-latest runs-on: ubuntu-20.04
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
docker-file: docker-file:
- path: 10 - path: 10
tags: 10,dubnium tags: "10 dubnium"
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6 platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6
- path: 12 - path: 12
tags: 12,erbium tags: "12 erbium"
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/arm/v7,linux/arm/v6 platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/arm/v7,linux/arm/v6
- path: 14 - path: 14
tags: 14,fermium,latest tags: "14 fermium latest"
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/arm/v7,linux/arm/v6 platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/arm/v7,linux/arm/v6
steps: steps:
- name: Checkout - name: Checkout
@ -31,12 +31,17 @@ jobs:
run: | run: |
DOCKER_IMAGE=timbru31/node-alpine-git DOCKER_IMAGE=timbru31/node-alpine-git
TAGZ=$(echo ${{ matrix.docker-file.tags }} | tr "," "\n") TEMP="${{ matrix.docker-file.tags }}"
TAGZ=($TEMP)
VERSION=${TAGZ[0]} VERSION=${TAGZ[0]}
for tag in $TAGZ for i in "${!TAGZ[@]}"; do
do if [ "$i" -eq "0" ];
TAGS="${TAGS},${DOCKER_IMAGE}:${tag}" then
TAGS="${DOCKER_IMAGE}:${TAGZ[$i]}"
else
TAGS="${TAGS},${DOCKER_IMAGE}:${TAGZ[$i]}"
fi
done done
echo ::set-output name=docker_image::${DOCKER_IMAGE} echo ::set-output name=docker_image::${DOCKER_IMAGE}