Files
tasknote/.github/workflows/build-server-candidate.yml
T
rmcampos 642eee6de1 feat: update docker tag image to fixed version. (#12)
## What

- Fixes the docker builder image.
- Closes #5

## Why

- Prevent breaking with new versions

## Mood

<img width="200" src="https://media1.giphy.com/media/ZIH0Slo6J6PQY/giphy.gif?cid=5a38a5a2fxikxj29q5nul4d9k1kh6u4doey1mujpjesj30uf&amp;ep=v1_gifs_search&amp;rid=giphy.gif&amp;ct=g" style="border:0;height:168px;width:300px"/>

Reviewed-on: #12
2026-07-16 18:37:03 +00:00

51 lines
1.4 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:0.0.505
- name: Tag and push candidate
run: |
docker tag rmcampos/tasknote-api:latest rmcampos/tasknote-api:candidate
docker push rmcampos/tasknote-api:candidate
- name: Log pushed images
run: |
echo "Pushed images:"
echo " rmcampos/tasknote-api:latest"
echo " rmcampos/tasknote-api:candidate"