Skip to content

Commit

Permalink
Atualização deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
tibetteixeira committed May 22, 2024
1 parent 8f7587d commit 0d0e4ae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Deploy

on:
push:
pull_request:
branches:
- main
- master

jobs:
run-unit-tests:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -30,10 +30,10 @@ jobs:
run: mvn clean package

- name: Docker Compose Build
run: docker compose build
run: docker build ${{ secrets.DOCKER_USERNAME }}/minhasfinancas

- 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
docker tag ${{ secrets.DOCKER_USERNAME }}/minhasfinancas:latest ${{ secrets.DOCKER_USERNAME }}/minhasfinancas:${{ github.run_id }}
docker push ${{ secrets.DOCKER_USERNAME }}/minhasfinancas:${{ github.run_id }}
docker push ${{ secrets.DOCKER_USERNAME }}/minhasfinancas:latest
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM openjdk:17-jdk-slim
ARG JAR_FILE=target/*.jar
COPY ${JAR_FILE} app.jar
ENTRYPOINT ["java","-jar","/app.jar"]
COPY ${JAR_FILE} minhasfinancas.jar
ENTRYPOINT ["java","-jar","minhasfinancas.jar"]

0 comments on commit 0d0e4ae

Please sign in to comment.