fixed
This commit is contained in:
parent
54d4568d2b
commit
775c8e0c21
@ -2,62 +2,18 @@ name: "Build gradle"
|
|||||||
description: "Build docker image with docker"
|
description: "Build docker image with docker"
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
image_name: # id of input
|
target: # id of input
|
||||||
description: "Name of image"
|
description: "Gradle target for build"
|
||||||
required: true
|
required: true
|
||||||
tag: # id of input
|
default: "build"
|
||||||
description: "Tag of image"
|
|
||||||
required: true
|
|
||||||
# outputs:
|
|
||||||
# random-number:
|
|
||||||
# description: "Random number"
|
|
||||||
# value: ${{ steps.random-number-generator.outputs.random-number }}
|
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- name: "Publish Image Name"
|
|
||||||
run: 'echo "Image name: $IMAGE_NAME"'
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
IMAGE_NAME: ${{ inputs.image_name }}
|
|
||||||
- name: Setup Jvm
|
- name: Setup Jvm
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
java-version: 21
|
java-version: 21
|
||||||
distribution: "adopt"
|
distribution: "adopt"
|
||||||
- name: "Building"
|
- name: "Building"
|
||||||
env:
|
|
||||||
HELM_REPOSITORY: ${{ vars.HELM_REPOSITORY }}
|
|
||||||
DOCKER_REGISTRY_USERNAME: ${{ vars.DOCKER_REGISTRY_USERNAME }}
|
|
||||||
DOCKER_REGISTRY_PASSWORD: ${{ vars.DOCKER_REGISTRY_PASSWORD }}
|
|
||||||
DOCKER_IMAGE_NAME: ${{ vars.DOCKER_REGISTRY_HOST }}/${{ inputs.image_name }}:${{ inputs.tag }}
|
|
||||||
DOCKER_REGISTRY_HOST: ${{ vars.DOCKER_REGISTRY_HOST }}
|
|
||||||
DOCKER_HOST: unix:///run/podman/podman.sock
|
|
||||||
shell: bash
|
shell: bash
|
||||||
run: "./gradlew -Pversion=${{ inputs.image_name }} clean buildDockerImage -Dorg.gradle.jvmargs=-Xmx4096M --parallel --no-daemon --no-watch-fs --stacktrace"
|
run: "./gradlew clean ${{ inputs.target }} -Dorg.gradle.jvmargs=-Xmx4096M --parallel --no-daemon --no-watch-fs --stacktrace"
|
||||||
# - name: Build Docker Image
|
|
||||||
# uses: redhat-actions/buildah-build@v2
|
|
||||||
# with:
|
|
||||||
# image: ${{ vars.DOCKER_REGISTRY_HOST }}/${{ inputs.image_name }}
|
|
||||||
# tags: ${{ inputs.image_name }}
|
|
||||||
# oci: true
|
|
||||||
# containerfiles: |
|
|
||||||
# ./server/Dockerfile
|
|
||||||
- name: Push to Repository
|
|
||||||
uses: redhat-actions/push-to-registry@v2
|
|
||||||
with:
|
|
||||||
image: ${{ inputs.image_name }}
|
|
||||||
tags: ${{ inputs.tag }}
|
|
||||||
registry: ${{ vars.DOCKER_REGISTRY_HOST }}
|
|
||||||
username: ${{ vars.DOCKER_REGISTRY_USERNAME }}
|
|
||||||
password: ${{ vars.DOCKER_REGISTRY_PASSWORD }}
|
|
||||||
# - name: Random Number Generator
|
|
||||||
# id: random-number-generator
|
|
||||||
# run: echo "random-number=$(echo $RANDOM)" >> $GITHUB_OUTPUT
|
|
||||||
# shell: bash
|
|
||||||
|
|
||||||
# - name: Set GitHub Path
|
|
||||||
# run: echo "$GITHUB_ACTION_PATH" >> $GITHUB_PATH
|
|
||||||
# shell: bash
|
|
||||||
# env:
|
|
||||||
# GITHUB_ACTION_PATH: ${{ github.action_path }}
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user