Skip to content

Commit

Permalink
Use commas to separate tags
Browse files Browse the repository at this point in the history
  • Loading branch information
stanhu committed Jan 16, 2025
1 parent 5b1d682 commit 7033413
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
id: setup_platform
run: |
ruby_platform=$(echo '${{ matrix.toolchain.ruby-platform }}')
aliases=$(echo '${{ toJSON(matrix.toolchain.aliases) }}' | jq -r 'if . == null then "" else join("\n") end')
aliases=$(echo '${{ toJSON(matrix.toolchain.aliases) }}' | jq -r 'if . == null then "" else join(",") end')
echo "ruby_platform=$ruby_platform" >> $GITHUB_ENV
echo "aliases=$aliases" >> $GITHUB_ENV
Expand Down Expand Up @@ -82,6 +82,7 @@ jobs:
${{ secrets.DOCKER_HUB_USERNAME }}/${{ env.ruby_platform }}
flavor: |
latest=auto
sep-tags: ','
tags: |
type=ref,event=branch
type=ref,event=pr
Expand All @@ -96,11 +97,11 @@ jobs:
id: prepare_tags
run: |
if [ -n "${{ env.aliases }}" ]; then
combined_tags="${{ steps.meta.outputs.tags }}\n${{ env.aliases }}"
combined_tags="${{ steps.meta.outputs.tags }},${{ env.aliases }}"
else
combined_tags="${{ steps.meta.outputs.tags }}"
fi
echo combined_tags="$combined_tags" >> $GITHUB_ENV
echo "combined_tags=$combined_tags" >> $GITHUB_ENV
- name: Docker build
uses: docker/build-push-action@v6
Expand Down

0 comments on commit 7033413

Please sign in to comment.