Merge pull request #172 from olech2412/171-share-button-in-mealplan-view #233
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-Pipeline-And-Deploy | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build-mensahub-models: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4.1.7 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4.2.1 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Cache Maven dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Build MensaHub-Models | |
run: | | |
cd MensaHub-Models | |
mvn clean install -nsu | |
- name: List Maven cache directory after build | |
run: ls -la ~/.m2/repository | |
build-and-deploy-collaborative-filtering-api-adapter: | |
runs-on: ubuntu-latest | |
needs: build-mensahub-models | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4.1.7 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4.2.1 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Cache Maven dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Build MensaHub-Collaborative-Filtering-Adapter | |
run: | | |
cd MensaHub-Collaborative-Filtering-API-Adapter | |
mvn clean install -nsu | |
build-and-publish-mensahub-collaborative-filter-api: | |
runs-on: ubuntu-latest | |
needs: [build-mensahub-models, build-and-deploy-collaborative-filtering-api-adapter] | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4.1.7 | |
- name: Build Docker image for amd64 & arm64 | |
run: | | |
cd addons/collaborative_filtering/ | |
docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} -p ${{ secrets.DOCKER_HUB_TOKEN }} | |
docker buildx create --use | |
docker buildx inspect --bootstrap | |
docker buildx build --platform linux/amd64,linux/arm64 -t ${{ secrets.DOCKER_HUB_USERNAME }}/mensahub_collaborative_filtering_api --push . | |
env: | |
DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }} | |
build-and-publish-mensahub-gateway: | |
runs-on: ubuntu-latest | |
needs: [build-mensahub-models, build-and-deploy-collaborative-filtering-api-adapter] | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4.1.7 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4.2.1 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Cache Maven dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Build MensaHub-Gateway | |
run: 'mvn -s $GITHUB_WORKSPACE/.github/config/maven-settings.xml -Dpackage.publicKey=$PACKAGE_READ clean install -pl MensaHub-Gateway -nsu' | |
env: | |
PACKAGE_READ: ${{ secrets.PACKAGE_READ }} | |
- name: Build Docker image for amd64 & arm64 | |
run: | | |
cd MensaHub-Gateway | |
docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} -p ${{ secrets.DOCKER_HUB_TOKEN }} | |
docker buildx create --use | |
docker buildx inspect --bootstrap | |
docker buildx build --platform linux/amd64,linux/arm64 -t ${{ secrets.DOCKER_HUB_USERNAME }}/mensahub-gateway --push . | |
env: | |
DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }} | |
build-and-publish-mensahub-junction: | |
runs-on: ubuntu-latest | |
needs: [build-mensahub-models, build-and-deploy-collaborative-filtering-api-adapter] | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4.1.7 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4.2.1 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Cache Maven dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Install NPM bloat | |
run: 'npm i --save-dev @types/node' | |
- name: Build MensaHub-Junction | |
run: 'mvn -s $GITHUB_WORKSPACE/.github/config/maven-settings.xml -Dpackage.publicKey=$PACKAGE_READ clean package -P production -pl MensaHub-Junction -nsu' | |
env: | |
PACKAGE_READ: ${{ secrets.PACKAGE_READ }} | |
- name: Build Docker image for amd64 & arm64 | |
run: | | |
cd MensaHub-Junction | |
docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} -p ${{ secrets.DOCKER_HUB_TOKEN }} | |
docker buildx create --use | |
docker buildx inspect --bootstrap | |
docker buildx build --platform linux/amd64,linux/arm64 -t ${{ secrets.DOCKER_HUB_USERNAME }}/mensahub-junction --push . | |
env: | |
DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }} | |
build-and-publish-mensahub-data-dispatcher: | |
runs-on: ubuntu-latest | |
needs: [build-mensahub-models, build-and-deploy-collaborative-filtering-api-adapter] | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4.1.7 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4.2.1 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Cache Maven dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Build MensaHub-DataDispatcher | |
run: 'mvn -s $GITHUB_WORKSPACE/.github/config/maven-settings.xml -Dpackage.publicKey=$PACKAGE_READ clean install -pl MensaHub-DataDispatcher -nsu' | |
env: | |
PACKAGE_READ: ${{ secrets.PACKAGE_READ }} | |
- name: Build Docker image for amd64 & arm64 | |
run: | | |
cd MensaHub-DataDispatcher | |
docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} -p ${{ secrets.DOCKER_HUB_TOKEN }} | |
docker buildx create --use | |
docker buildx inspect --bootstrap | |
docker buildx build --platform linux/amd64,linux/arm64 -t ${{ secrets.DOCKER_HUB_USERNAME }}/mensahub-datadispatcher --push . | |
env: | |
DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }} |