Public Access
Login should work now, tests are missing
This commit is contained in:
1 parent
8dd17f84f6
commit
7e8a04d83c
13 files changed
+392
-17
No files matched your search
@@ -0,0 +1,71 @@
|
||||
name: Build, Test & Push Auth Service
|
||||
|
||||
# Trigger the workflow
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
# ------------------------------------------------------------------
|
||||
# JOB 1: Code integrity and quality gates (CI)
|
||||
# ------------------------------------------------------------------
|
||||
quality-check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Java 25
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: '25'
|
||||
distribution: 'temurin'
|
||||
# Automatically cache Maven dependencies to speed up builds
|
||||
cache: 'maven'
|
||||
|
||||
- name: Build and Test with Maven
|
||||
# Run all tests (including Spring Boot context loads) to ensure stability
|
||||
run: ./mvnw clean verify
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# JOB 2: Docker Build & Push (CD)
|
||||
# Runs only if 'quality-check' is successful and we are on branch main
|
||||
# ------------------------------------------------------------------
|
||||
docker:
|
||||
needs: quality-check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Prepare tag
|
||||
id: prep
|
||||
shell: bash
|
||||
run: |
|
||||
# Sanitize branch name for valid Docker tags
|
||||
BRANCH="${GITHUB_REF_NAME}"
|
||||
BRANCH="${BRANCH//\//-}"
|
||||
BRANCH="$(echo "$BRANCH" | tr '[:upper:]' '[:lower:]')"
|
||||
echo "branch=$BRANCH" >> "$GITHUB_OUTPUT"
|
||||
echo "sha=${GITHUB_SHA::12}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Gitea Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.andreas-dahm.eu
|
||||
# Use your Gitea Secrets here
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.TOKEN_GITEA }}
|
||||
|
||||
- name: Build & Push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: |
|
||||
git.andreas-dahm.eu/lobo_corp/tbp-auth-service:${{ steps.prep.outputs.branch }}
|
||||
git.andreas-dahm.eu/lobo_corp/tbp-auth-service:${{ steps.prep.outputs.branch }}-${{ steps.prep.outputs.sha }}
|
||||
git.andreas-dahm.eu/lobo_corp/tbp-auth-service:latest
|
||||
Reference in new issue
Block a user