DEVEX-20:
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
name: 'Build Backend'
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
repo_path:
|
||||
description: 'Репозиторий'
|
||||
required: true
|
||||
type: choice
|
||||
options:
|
||||
- devspc/devspace-apiregistry-generator-service
|
||||
- devspc/devspace-gateway
|
||||
- devspc/devspace-apiregistry-core-service
|
||||
- devspc/devspace-selfkit-ui
|
||||
default: devspc/devspace-apiregistry-generator-service
|
||||
branch:
|
||||
description: 'Ветка'
|
||||
required: true
|
||||
type: string
|
||||
default: master
|
||||
version:
|
||||
description: 'Версия образа'
|
||||
required: true
|
||||
type: number
|
||||
jobs:
|
||||
deploy-dev:
|
||||
name: 'Deploy to dev'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Cloning2
|
||||
uses: https://git.binom.pw/otp/devops/clone@main
|
||||
with:
|
||||
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
repository: ${{ github.event.inputs.repo_path }}
|
||||
branch: ${{ github.event.inputs.branch }}
|
||||
- uses: https://git.binom.pw/otp/devops/config-gradle@main
|
||||
- uses: https://git.binom.pw/otp/devops/setup-gradle@main
|
||||
- name: Setup Jvm
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: 21
|
||||
distribution: "adopt"
|
||||
- name: Building
|
||||
run: |
|
||||
./gradlew bootJar --no-daemon -x cyclonedxBom
|
||||
echo 'Jar in libs folder'
|
||||
ls ./build/libs
|
||||
- name: Publishing docker
|
||||
uses: https://git.binom.pw/otp/devops/docker@main
|
||||
with:
|
||||
image-name: "otp/${{ github.event.inputs.repo_path }}"
|
||||
tags: ${{ github.event.inputs.version }}
|
||||
- name: 'Cleanup'
|
||||
if: always()
|
||||
shell: bash
|
||||
run: |
|
||||
echo 'Cleaning...'
|
||||
rm -rf ~/.gradle/init.gradle.kts
|
||||
rm -rf ~/.ssh/config
|
||||
rm -rf ~/.ssh/my_key
|
||||
Reference in New Issue
Block a user