Skip to content

Commit

Permalink
Support multiple tags for jib images
Browse files Browse the repository at this point in the history
  • Loading branch information
philipp94831 committed Jan 27, 2025
1 parent 28b0f33 commit 738da5b
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions actions/java-gradle-build-jib/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,21 +82,18 @@ runs:
event=tag,type=semver,pattern={{version}}
event=pr,type=ref
event=push,type=raw,value=pipeline-${{ github.run_id }}-git-{{sha}},enable=${{ github.ref_type != 'tag' }}
sep-tags: ','

- name: Build Docker image
run: |
VAR="${{ steps.meta.outputs.tags }}"
echo $VAR
tags=$(echo $VAR | tr ' ' ',')
echo $tags
# ./gradlew jib \
# --info --stacktrace \
# -Djib.from.platforms=${{ inputs.platforms }} \
# ${{ inputs.jib-from-image && format('-Djib.from.image={0}', inputs.jib-from-image) || '' }} \
# ${{ inputs.class && format('-Djib.container.mainClass={0}', inputs.class) || '' }} \
# ${{ inputs.repository && format('-DjibImage.repository={0}', inputs.repository) || '' }} \
# -DjibImage.tags=${{ steps.meta.outputs.tags }} \
# ${{ inputs.gradle-refresh-dependencies == 'true' && '--refresh-dependencies' || '' }} \
# ${{ inputs.allow-insecure-registries == 'true' && '-Djib.allowInsecureRegistries=true' || '' }}
./gradlew jib \
--info --stacktrace \
-Djib.from.platforms=${{ inputs.platforms }} \
${{ inputs.jib-from-image && format('-Djib.from.image={0}', inputs.jib-from-image) || '' }} \
${{ inputs.class && format('-Djib.container.mainClass={0}', inputs.class) || '' }} \
${{ inputs.repository && format('-DjibImage.repository={0}', inputs.repository) || '' }} \
-DjibImage.tags=${{ steps.meta.outputs.tags }} \
${{ inputs.gradle-refresh-dependencies == 'true' && '--refresh-dependencies' || '' }} \
${{ inputs.allow-insecure-registries == 'true' && '-Djib.allowInsecureRegistries=true' || '' }}
shell: bash
working-directory: ${{ inputs.working-directory }}

0 comments on commit 738da5b

Please sign in to comment.