Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tagging java-gradle-build-jib action #208

Merged
merged 65 commits into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from 63 commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
df7a793
fix-tags
yordanovsstoyan Aug 7, 2024
c32012e
fix
yordanovsstoyan Aug 7, 2024
4ca2f95
fix-shat
yordanovsstoyan Aug 7, 2024
d03fb25
docker-tag
yordanovsstoyan Aug 7, 2024
f84ee0c
tag-test
yordanovsstoyan Aug 7, 2024
21b1be8
git-sha-test
yordanovsstoyan Aug 7, 2024
87e8cb1
git-sha-test-2
yordanovsstoyan Aug 7, 2024
264cb67
additional tags
yordanovsstoyan Aug 8, 2024
3ce04c5
additional tags-step
yordanovsstoyan Aug 8, 2024
3da67f0
env
yordanovsstoyan Aug 8, 2024
beb479b
shortsha
yordanovsstoyan Aug 8, 2024
f29673a
tesstt
yordanovsstoyan Aug 8, 2024
3a3ce69
tesstt
yordanovsstoyan Aug 8, 2024
99fb418
tesstt
yordanovsstoyan Aug 8, 2024
88cbd6b
tesstt
yordanovsstoyan Aug 8, 2024
b621cc2
tesstt-123
yordanovsstoyan Aug 8, 2024
341271e
tesstt-123
yordanovsstoyan Aug 8, 2024
6e5bfec
test
yordanovsstoyan Aug 13, 2024
3db71c0
add-additional
yordanovsstoyan Aug 13, 2024
2a98947
add-additional-test
yordanovsstoyan Aug 13, 2024
79de2e4
add-additional-test
yordanovsstoyan Aug 13, 2024
9021d59
latest
yordanovsstoyan Aug 13, 2024
4bc93b2
auto
yordanovsstoyan Aug 13, 2024
9aedf8c
auto
yordanovsstoyan Aug 13, 2024
d8fecf9
test
yordanovsstoyan Aug 13, 2024
227ba32
test-=123
yordanovsstoyan Aug 13, 2024
770dbb1
sha-7
yordanovsstoyan Aug 13, 2024
2a19d37
flavor
yordanovsstoyan Aug 13, 2024
f09d680
latest-remove
yordanovsstoyan Aug 13, 2024
ae95c01
latest-remove
yordanovsstoyan Aug 13, 2024
99b0b16
latest-tst
yordanovsstoyan Aug 13, 2024
b43a428
latest-tst
yordanovsstoyan Aug 13, 2024
bf58b2c
echo tags
yordanovsstoyan Aug 13, 2024
9b46a78
image-tags
yordanovsstoyan Aug 13, 2024
5753bad
image-tags
yordanovsstoyan Aug 13, 2024
dbe8e3d
image-tags
yordanovsstoyan Aug 13, 2024
2650b08
image-tags
yordanovsstoyan Aug 13, 2024
f6c31f9
image-tags
yordanovsstoyan Aug 13, 2024
3ab3104
ref
yordanovsstoyan Aug 13, 2024
cb6ab8b
ref
yordanovsstoyan Aug 13, 2024
34631e9
ref
yordanovsstoyan Aug 13, 2024
158cd3b
ref
yordanovsstoyan Aug 13, 2024
ad9759a
ref
yordanovsstoyan Aug 13, 2024
bbf7fb1
ref
yordanovsstoyan Aug 13, 2024
8b3c86f
ref
yordanovsstoyan Aug 13, 2024
972035b
ref
yordanovsstoyan Aug 13, 2024
ce024cf
ref
yordanovsstoyan Aug 13, 2024
48730c8
tag
yordanovsstoyan Aug 14, 2024
092c402
latest
yordanovsstoyan Aug 14, 2024
309c73e
latest
yordanovsstoyan Aug 14, 2024
afa95ce
1step test
yordanovsstoyan Aug 14, 2024
302d792
1step test
yordanovsstoyan Aug 14, 2024
308247e
1step test
yordanovsstoyan Aug 14, 2024
510c6c0
1step test
yordanovsstoyan Aug 14, 2024
4f04024
1step test
yordanovsstoyan Aug 14, 2024
4c8b0f8
1step test
yordanovsstoyan Aug 14, 2024
3968b9a
1step test
yordanovsstoyan Aug 14, 2024
cac5834
tagging-test
yordanovsstoyan Aug 14, 2024
93d8466
if-condition
yordanovsstoyan Aug 14, 2024
331f5c3
if-condition
yordanovsstoyan Aug 14, 2024
08f9ec8
if-condition
yordanovsstoyan Aug 14, 2024
0875a93
if-condition-1line
yordanovsstoyan Aug 14, 2024
7d6f39d
new-1-line
yordanovsstoyan Aug 14, 2024
d74abd8
Update actions/java-gradle-build-jib/action.yaml
yordanovsstoyan Aug 15, 2024
3215812
fix
yordanovsstoyan Aug 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions actions/java-gradle-build-jib/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ inputs:
description: "Name of Docker image."
required: false
default: "${{ github.event.repository.name }}"
image-tags:
description: "Tag of Jib Image (comma separated list)"
required: false
default: "pipeline-${{ github.run_id }}-git-{{ sha }}"
full-image-name:
description: "Full name of image (registry/image:tag) If an image name is provided without a tag, 'latest' will be used. Be careful with registries that dont allow overwriting tags."
yordanovsstoyan marked this conversation as resolved.
Show resolved Hide resolved
required: true
Expand Down Expand Up @@ -86,9 +82,10 @@ runs:
with:
images: ${{ inputs.image-name }}
tags: |
event=push,type=raw,value=${{ inputs.image-tags }}
event=pr,type=raw,value=${{ inputs.image-tags }}
event=tag,type=semver,pattern={{ version }}
event=tag,type=semver,pattern={{version}}
event=push,type=raw,value=pipeline-${{ github.run_id }}-git-{{sha}},enable=${{ github.ref_type != 'tag' }}
flavor: |
latest=false

- name: Build Docker image
run: |
Expand All @@ -98,8 +95,8 @@ runs:
-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) || '' }} \
-Djib.to.image=${{ inputs.full-image-name }} \
-Djib.to.tags=$(echo "${{ steps.meta.outputs.tags }}" | tr ',' '\n' | sed 's/.*://') \
-Djib.to.image=${{ inputs.full-image-name }}$(echo ${{ steps.meta.outputs.tags }} | sed 's/.*\(:.*\)/\1/') \
$([[ "${{ github.ref_type }}" == "tag" ]] && echo "-Djib.to.tags=latest") \
${{ inputs.gradle-refresh-dependencies == 'true' && '--refresh-dependencies' || '' }} \
${{ inputs.allow-insecure-registries == 'true' && '-Djib.allowInsecureRegistries=true' || '' }}
shell: bash
Expand Down
1 change: 0 additions & 1 deletion docs/actions/java-gradle-build-jib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
| gradle-refresh-dependencies | string | false | `"false"` | Whether Gradle should refresh dependencies. (Default is false) |
| gradle-version | string | false | `"wrapper"` | Gradle version to be installed. (Default is wrapper) |
| image-name | string | false | `"${{ github.event.repository.name }}"` | Name of Docker image. |
| image-tags | string | false | `"pipeline-${{ github.run_id }}-git-{{ sha }}"` | Tag of Jib Image (comma separated list) |
| java-distribution | string | false | `"microsoft"` | Java distribution to be installed. (Default is microsoft) |
| java-version | string | false | `"11"` | Java version to be installed. (Default is 11) |
| jib-from-image | string | false | | The Jib base image to use |
Expand Down
Loading