fix
This commit is contained in:
parent
f441ad6018
commit
7867fd8eed
@ -1,47 +0,0 @@
|
|||||||
name: "Build gradle"
|
|
||||||
description: Build docker image with docker
|
|
||||||
|
|
||||||
inputs:
|
|
||||||
image_name:
|
|
||||||
description: Name of image
|
|
||||||
required: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
gradle-build:
|
|
||||||
steps:
|
|
||||||
- name: Setup Jvm
|
|
||||||
uses: actions/setup-java@v1
|
|
||||||
with:
|
|
||||||
java-version: 21
|
|
||||||
distribution: "adopt"
|
|
||||||
- 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 }}:${{ gitea.ref_name }}
|
|
||||||
DOCKER_REGISTRY_HOST: ${{ vars.DOCKER_REGISTRY_HOST }}
|
|
||||||
DOCKER_HOST: unix:///run/podman/podman.sock
|
|
||||||
run: "./gradlew -Pversion=${{ gitea.ref_name }} shadowJar -Dorg.gradle.jvmargs=-Xmx4096M --parallel --no-daemon --no-watch-fs --stacktrace"
|
|
||||||
- name: Log in to Repository
|
|
||||||
uses: redhat-actions/podman-login@v1
|
|
||||||
with:
|
|
||||||
registry: ${{ vars.DOCKER_REGISTRY_HOST }}
|
|
||||||
username: ${{ vars.DOCKER_REGISTRY_USERNAME }}
|
|
||||||
password: ${{ vars.DOCKER_REGISTRY_PASSWORD }}
|
|
||||||
- name: Buildah Action
|
|
||||||
uses: redhat-actions/buildah-build@v2
|
|
||||||
with:
|
|
||||||
image: ${{ vars.DOCKER_REGISTRY_HOST }}/${{ inputs.image_name }}
|
|
||||||
tags: ${{ gitea.ref_name }}
|
|
||||||
oci: true
|
|
||||||
containerfiles: |
|
|
||||||
./server/Dockerfile
|
|
||||||
- name: Push to Repository
|
|
||||||
uses: redhat-actions/push-to-registry@v2
|
|
||||||
with:
|
|
||||||
image: ${{ vars.DOCKER_REGISTRY_HOST }}/${{ inputs.image_name }}
|
|
||||||
tags: ${{ gitea.ref_name }}
|
|
||||||
registry: ${{ vars.DOCKER_REGISTRY_HOST }}
|
|
||||||
username: ${{ vars.DOCKER_REGISTRY_USERNAME }}
|
|
||||||
password: ${{ vars.DOCKER_REGISTRY_PASSWORD }}
|
|
||||||
@ -5,6 +5,9 @@ inputs:
|
|||||||
image_name: # id of input
|
image_name: # id of input
|
||||||
description: "Name of image"
|
description: "Name of image"
|
||||||
required: true
|
required: true
|
||||||
|
tag: # id of input
|
||||||
|
description: "Tag of image"
|
||||||
|
required: true
|
||||||
# outputs:
|
# outputs:
|
||||||
# random-number:
|
# random-number:
|
||||||
# description: "Random number"
|
# description: "Random number"
|
||||||
@ -27,16 +30,16 @@ runs:
|
|||||||
HELM_REPOSITORY: ${{ vars.HELM_REPOSITORY }}
|
HELM_REPOSITORY: ${{ vars.HELM_REPOSITORY }}
|
||||||
DOCKER_REGISTRY_USERNAME: ${{ vars.DOCKER_REGISTRY_USERNAME }}
|
DOCKER_REGISTRY_USERNAME: ${{ vars.DOCKER_REGISTRY_USERNAME }}
|
||||||
DOCKER_REGISTRY_PASSWORD: ${{ vars.DOCKER_REGISTRY_PASSWORD }}
|
DOCKER_REGISTRY_PASSWORD: ${{ vars.DOCKER_REGISTRY_PASSWORD }}
|
||||||
DOCKER_IMAGE_NAME: ${{ vars.DOCKER_REGISTRY_HOST }}/${{ inputs.image_name }}:${{ gitea.ref_name }}
|
DOCKER_IMAGE_NAME: ${{ vars.DOCKER_REGISTRY_HOST }}/${{ inputs.image_name }}:${{ inputs.image_name }}
|
||||||
DOCKER_REGISTRY_HOST: ${{ vars.DOCKER_REGISTRY_HOST }}
|
DOCKER_REGISTRY_HOST: ${{ vars.DOCKER_REGISTRY_HOST }}
|
||||||
DOCKER_HOST: unix:///run/podman/podman.sock
|
DOCKER_HOST: unix:///run/podman/podman.sock
|
||||||
shell: bash
|
shell: bash
|
||||||
run: "./gradlew -Pversion=${{ gitea.ref_name }} clean buildDockerImage -Dorg.gradle.jvmargs=-Xmx4096M --parallel --no-daemon --no-watch-fs --stacktrace"
|
run: "./gradlew -Pversion=${{ inputs.image_name }} clean buildDockerImage -Dorg.gradle.jvmargs=-Xmx4096M --parallel --no-daemon --no-watch-fs --stacktrace"
|
||||||
# - name: Build Docker Image
|
# - name: Build Docker Image
|
||||||
# uses: redhat-actions/buildah-build@v2
|
# uses: redhat-actions/buildah-build@v2
|
||||||
# with:
|
# with:
|
||||||
# image: ${{ vars.DOCKER_REGISTRY_HOST }}/${{ inputs.image_name }}
|
# image: ${{ vars.DOCKER_REGISTRY_HOST }}/${{ inputs.image_name }}
|
||||||
# tags: ${{ gitea.ref_name }}
|
# tags: ${{ inputs.image_name }}
|
||||||
# oci: true
|
# oci: true
|
||||||
# containerfiles: |
|
# containerfiles: |
|
||||||
# ./server/Dockerfile
|
# ./server/Dockerfile
|
||||||
@ -44,7 +47,7 @@ runs:
|
|||||||
uses: redhat-actions/push-to-registry@v2
|
uses: redhat-actions/push-to-registry@v2
|
||||||
with:
|
with:
|
||||||
image: ${{ inputs.image_name }}
|
image: ${{ inputs.image_name }}
|
||||||
tags: ${{ gitea.ref_name }}
|
tags: ${{ inputs.image_name }}
|
||||||
registry: ${{ vars.DOCKER_REGISTRY_HOST }}
|
registry: ${{ vars.DOCKER_REGISTRY_HOST }}
|
||||||
username: ${{ vars.DOCKER_REGISTRY_USERNAME }}
|
username: ${{ vars.DOCKER_REGISTRY_USERNAME }}
|
||||||
password: ${{ vars.DOCKER_REGISTRY_PASSWORD }}
|
password: ${{ vars.DOCKER_REGISTRY_PASSWORD }}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user