Merge pull request #4 from wi1sonh/hotfix #10
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 Pipeline | |
on: | |
push: | |
branches: | |
- main | |
- aliecs | |
pull_request: | |
branches: | |
- main | |
- aliecs | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
branch: [main, aliecs] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'adopt' | |
java-version: '17' | |
- name: Cache Maven packages | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Archive test results | |
if: always() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: test-results | |
path: target/surefire-reports/ | |
- name: Deploy to production | |
if: github.ref == 'refs/heads/main' | |
run: | | |
echo "Deploying to production environment" | |
# Add deployment commands here | |
- name: Deploy to test environment | |
if: github.ref == 'refs/heads/aliecs' | |
run: | | |
echo "Deploying to test environment" | |
# Add deployment commands here |