More specific error handling #3
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: Cupcake Backend | |
on: | |
push: | |
paths: | |
- backend/** | |
jobs: | |
push: | |
name: "Build Cupcake backend" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '22' | |
distribution: 'temurin' | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Build | |
run: ./gradlew :backend:clean :backend:build | |
# Insert docker build and push steps here | |
- name: Generate summary | |
run: | | |
echo "Tag: ${{ github.sha }}" >> $GITHUB_STEP_SUMMARY | |
- name: Upload reports if failed | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: search-reports | |
path: | | |
**/build/reports/ | |
**/build/test-results/ | |
- name: Upload coverage if passed | |
if: success() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: search-coverage | |
path: | | |
**/build/reports/jacoco/ |