58 lines
1.9 KiB
YAML
58 lines
1.9 KiB
YAML
name: 'Build Agent'
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
branch:
|
|
description: 'Ветка'
|
|
required: true
|
|
type: string
|
|
default: 'feature/DEVX-191'
|
|
jobs:
|
|
deploy-dev:
|
|
name: 'Deploy to dev'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: 'Print Info'
|
|
run: |
|
|
echo "Cloning ${{ github.event.inputs.repo_path }}"
|
|
echo "From branch ${{ github.event.inputs.branch }}"
|
|
- name: Cloning
|
|
uses: https://git.binom.pw/otp/devops/clone@main
|
|
with:
|
|
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
|
repository: 'devspc/devspace-agent'
|
|
branch: ${{ github.event.inputs.branch }}
|
|
- name: 'Конфигурирование интеграции gradle'
|
|
uses: https://git.binom.pw/otp/devops/config-gradle@main
|
|
- name: 'Конфигурирование gradle wrapper'
|
|
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 shadowJar --no-daemon -x cyclonedxBom
|
|
echo 'Jar in libs folder'
|
|
ls ./build/libs
|
|
- name: Build and push Docker Image
|
|
uses: https://git.binom.pw/subochev/devops/build-docker@main
|
|
with:
|
|
image_name: "otp/agent"
|
|
tags: latest ${GITEA_RUN_NUMBER}
|
|
- name: Publishing Helm
|
|
uses: https://git.binom.pw/subochev/devops/helm-publish/action.yml@main
|
|
with:
|
|
chart_directory: "helm"
|
|
helm_version: "${GITEA_RUN_NUMBER}"
|
|
helm_version_placeholder: '0.1.0'
|
|
|
|
- name: 'Cleanup'
|
|
if: always()
|
|
shell: bash
|
|
run: |
|
|
echo 'Cleaning...'
|
|
rm -rf ~/.gradle/init.gradle.kts
|
|
rm -rf ~/.ssh/config
|
|
rm -rf ~/.ssh/my_key |