-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (32 loc) · 1.03 KB
/
deploy.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
name: Deploy
on:
pull_request:
branches:
- main
- master
jobs:
run-unit-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Docker Login
uses: docker/login-action@v2.0.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'adopt'
cache: maven
- name: Build Application JAR
run: mvn clean package
- name: Docker Compose Build
run: docker compose build
- name: Push to DockerHub Container Registry
run: |
docker tag ${{ secrets.DOCKER_USERNAME }}/minhas-financas:latest ${{ secrets.DOCKER_USERNAME }}/minhas-financas:${{ github.run_id }}
docker push ${{ secrets.DOCKER_USERNAME }}/minhas-financas:${{ github.run_id }}
docker push ${{ secrets.DOCKER_USERNAME }}/minhas-financas:latest