-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (34 loc) · 918 Bytes
/
cicd-dev.yml
File metadata and controls
45 lines (34 loc) · 918 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: cicd-dev
on:
push:
branches: [ "develop" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and Push Docker Image with Jib
run: ./gradlew jib
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Run scripts in server
uses: appleboy/ssh-action@master
with:
key: ${{ secrets.PRIVATE_KEY }}
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
script: ${{ secrets.DEPLOY_DEVELOP_SCRIPT }}