Skip to content

zmiana input number #70

zmiana input number

zmiana input number #70

Workflow file for this run

name: Build, Build Docker Image and Deploy
on:
push:
branches:
- master
jobs:
build_and_deploy:
runs-on: ubuntu-latest
if: "contains(github.event.head_commit.message, 'DEPLOY')"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: Set up Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.9.8
- name: Maven version
run: mvn -version
- name: Build with Maven
run: mvn -B package --file pom.xml -Dmaven.test.skip=true -Djasypt.encryptor.password=${{ secrets.JSPT }} -Dspring.mail.password=${{ secrets.GMAIL_PS }} -Dserver.ssl.key-store-password=${{ secrets.ESESEL }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: janisbe/komornik-app:v1
- name: Copy JAR to Oracle Server
uses: appleboy/scp-action@master
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USERNAME }}
key: ${{ secrets.SERVER_SSH_KEY }}
port: ${{ secrets.PORT }}
overwrite: true
source: "./target/komornik-0.0.1-SNAPSHOT.jar"
target: "/home/ubuntu/Documents/"
strip_components: 2
- name: bump app version
uses: appleboy/[email protected]
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USERNAME }}
key: ${{ secrets.SERVER_SSH_KEY }}
port: ${{ secrets.PORT }}
script: whoami