Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,21 @@ on:
branches: [ "master" ]

jobs:

build:

build-and-dockerize:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)
- name: Checkout code
uses: actions/checkout@v3

- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'

- name: Build with Maven
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (performance): Adicionar cache para dependências do Maven

Considere usar actions/cache para armazenar em cache o diretório ~/.m2/repository para builds mais rápidos, reutilizando as dependências do Maven.

Original comment in English

suggestion (performance): Add caching for Maven dependencies

Consider using actions/cache to cache the ~/.m2/repository directory for faster builds by reusing Maven dependencies.

run: mvn clean package

- name: Build Docker image
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (bug_risk): Contexto de build do Docker ausente

Especifique o contexto de build no seu comando docker build (por exemplo, adicione . no final). Se o seu Dockerfile não estiver no diretório raiz, use a flag -f para indicar sua localização.

Original comment in English

issue (bug_risk): Missing Docker build context

Please specify the build context in your docker build command (e.g., add . at the end). If your Dockerfile is not in the root directory, use the -f flag to point to its location.

run: docker build -t aifoodapp:latest
Loading