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: Falcon Challenge CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
env: | |
USER: gaetanbloch | |
REPO: falconchallenge | |
jobs: | |
pipeline: | |
name: Falcon Challenge Pipeline | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.pull_request.title, '[skip ci]') && !contains(github.event.pull_request.title, '[ci skip]')" | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout the code | |
uses: actions/checkout@v3 | |
- name: Setup Java 17 | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Run unit and integration tests | |
run: | | |
chmod +x mvnw | |
./mvnw -ntp verify --batch-mode | |
- name: Analyze coverage with codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true | |
verbose: true | |
- name: Package the application | |
run: | | |
chmod +x mvnw | |
./mvnw -ntp package -pl web -am --batch-mode -Dquarkus.package.type=uber-jar -DskipTests | |
- name: Login to the Github Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ env.USER }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build the Docker Image | |
run: | | |
cd web | |
docker build -f src/main/docker/Dockerfile.uber-jar \ | |
-t ghcr.io/${{ env.USER }}/${{ env.REPO }}:latest . | |
docker push ghcr.io/${{ env.USER }}/${{ env.REPO }}:latest |