update github-actions.yml #7
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: Build project | |
on: | |
push: | |
branches: | |
- "*" | |
pull_request: | |
branches: | |
- "*" | |
jobs: | |
Explore-GitHub-Actions: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up JDK 17 for x64 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'corretto' | |
architecture: 'x64' | |
- name: Build & Test | |
run: mvn -B clean package | |
- name: Install Docker Compose | |
run: sudo apt-get update && sudo apt-get install -y docker-compose | |
- name: Create & run Docker image | |
run: docker-compose up -d --build | |
- name: Clean up Docker resources | |
run: | | |
docker-compose down | |
docker system prune -af |