-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (32 loc) · 941 Bytes
/
main.yml
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
name: GitHub CI with Gradle
on: [push]
jobs:
build:
runs-on: self-hosted
permissions:
contents: read
steps:
- name: Checkout to develop
uses: actions/checkout@v4
with:
ref: develop
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'zulu'
- name: Create application.yml
run: |
touch ./src/main/resources/application.yml
echo "${{ secrets.APPLICATION_YML }}" > ./src/main/resources/application.yml
- name: Build with Gradle
run: |
chmod +x gradlew
./gradlew build
- name: Add to Docker
run: |
whoami
docker container rm route -f
docker rmi palette_route -f
docker build --file Dockerfile -t palette_route .
docker run -d -p 8080:8080 --name route palette_route