Files
tasknote/.github/workflows/build-server-candidate.yml
T
rmcampos 7f9ad2b6e8
Pull Request CI-Backend / Checks (pull_request) Successful in 53s
Pull Request CI-Backend / Build & Push (pull_request) Failing after 16s
Pull Request CI-Frontend / Checks (pull_request) Successful in 3m14s
Pull Request CI-Frontend / Build & Push (pull_request) Failing after 1m7s
feat: update to use docker hub container registry
2026-06-15 16:46:17 -03:00

46 lines
1.3 KiB
YAML

name: Build Server Candidate
on:
workflow_dispatch:
jobs:
build-and-push-server:
name: Build & Push Server
runs-on: graalvm-25
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref }}
- name: Cache Maven dependencies
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/server/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build Docker image
working-directory: ./server
run: |
./mvnw -Pnative -DskipTests spring-boot:build-image \
-Dspring-boot.build-image.imageName=rmcampos/tasknote-api:latest \
-Dspring-boot.build-image.builder=paketobuildpacks/builder-jammy-tiny:latest
- name: Tag and push candidate
run: |
docker tag rmcampos/tasknote-api:latest rmcampos/tasknote-api:candidate
docker push rmcampos/tasknote-api:candidate