CI Build #67
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI Build | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- master | |
- quarkus_auth_db | |
jobs: | |
Build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v3 | |
- name: Set up Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '22' | |
- name: Set up Docker Compose | |
run: docker-compose up -d # Start Docker Compose services | |
- name: Wait for MariaDB to be ready | |
run: | | |
echo "Waiting for MariaDB to be ready..." | |
until docker-compose exec icat_mariadb mysqladmin ping -h 127.0.0.1 --silent; do sleep 5; done | |
shell: bash | |
- name: Build project and run unit tests | |
run: ./mvnw clean package -DskipTests | |
- name: Run integration tests | |
run: ./mvnw failsafe:integration-test | |
- name: Build native executable and run tests | |
run: ./mvnw package -DskipTests -Dnative -Dquarkus.native.container-build=true | |
- name: Login to Harbor | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ secrets.HARBOR_URL }} | |
username: ${{ secrets.HARBOR_USERNAME }} | |
password: ${{ secrets.HARBOR_PASSWORD }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v6 | |
with: | |
push: true | |
context: . | |
file: src/main/docker/Dockerfile.native | |
tags: ${{ secrets.HARBOR_URL }}/authn_simple:${{ github.ref_name }} |