This repository has been archived by the owner on Oct 4, 2024. It is now read-only.
Merge pull request #146 from SE-TINF22B2/dev-einkaufsliste #93
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: Backend CI | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ "main" ] | |
paths: | |
- 'backend/**' | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./backend | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Execute Gradle test | |
run: ./gradlew test | |
- name: Upload coverage reports to Codecov with GitHub Action | |
uses: codecov/[email protected] | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
build_and_publish: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./backend | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build and push the image | |
run: | | |
echo "${{ secrets.GH_PAT }}" | docker login ghcr.io -u USERNAME --password-stdin | |
docker build . --tag ghcr.io/flugschnitzel/get2gether:latest | |
docker push ghcr.io/flugschnitzel/get2gether:latest |