Skip to content

Commit

Permalink
Dynamically pass base image parameter (#137)
Browse files Browse the repository at this point in the history
  • Loading branch information
philipp94831 authored Aug 29, 2023
1 parent e55bc07 commit c39e367
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions actions/java-gradle-build-jib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ This action builds an image tarball using [Jib Gradle](https://github.com/Google
| working-directory || "." | string | Working directory of your Gradle artifacts |
| download-lfs-files || false | boolean | Whether the Git checkout action should resolve LFS files or not |
| subproject || | string | The Gradle subproject for which the tarball image should be built (If not specified, a tarball image for the root project will be built) |
| jib-from-image || | string | The Jib base image to use |

## Usage

Expand Down
4 changes: 4 additions & 0 deletions actions/java-gradle-build-jib/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ inputs:
subproject:
description: "The Gradle subproject for which the tarball image should be built (If not specified, a tarball image for the root project will be built)"
required: false
jib-from-image:
description: "The Jib base image to use"
required: false
runs:
using: "composite"
steps:
Expand All @@ -58,6 +61,7 @@ runs:
./gradlew ${{ inputs.subproject && format('{0}:', inputs.subproject) || '' }}jibBuildTar \
--info --stacktrace \
--image=${{ inputs.image-name }} \
${{ inputs.jib-from-image && format('-Djib.from.image={0}', inputs.jib-from-image) || '' }} \
-x test
shell: bash
working-directory: ${{ inputs.working-directory }}
Expand Down

0 comments on commit c39e367

Please sign in to comment.