-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (26 loc) · 894 Bytes
/
ci.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
name: CI
on:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: 'liberica'
java-version: '21'
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build application
run: ./gradlew clean build --no-daemon --exclude-task test
- name: Build Docker image
run: docker build --file Dockerfile -t ${{ secrets.DOCKER_HUB_ID }}/${{ secrets.DOCKER_HUB_REPO }} .
- name: Log in to Docker Hub
run: docker login -u ${{ secrets.DOCKER_HUB_ID }} --password ${{ secrets.DOCKER_HUB_PW }}
- name: Push Docker image
run: docker push ${{ secrets.DOCKER_HUB_ID }}/${{ secrets.DOCKER_HUB_REPO }}