Add support for AlpineBits HotelData 2022-10 #43
Workflow file for this run
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/CD | |
on: | |
push: | |
pull_request: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
env: | |
PROJECT_NAME: odh-alpinebits-server | |
DOCKER_IMAGE: ghcr.io/${{ github.repository }}/${{ github.event.repository.name }}-app | |
DOCKER_TAG: ${{ github.sha }} | |
JAVA_VERSION: '8' | |
jobs: | |
# Test | |
test: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v2 | |
- name: REUSE Compliance Check | |
uses: fsfe/reuse-action@v1 | |
- name: Test code | |
uses: noi-techpark/github-actions/maven-test@v2 | |
with: | |
java-version: ${{ env.JAVA_VERSION }} | |
test-command: mvn test | |
# Deploy test | |
deploy-test: | |
runs-on: ubuntu-20.04 | |
if: github.ref == 'refs/heads/main' | |
needs: test | |
concurrency: deploy-test | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v2 | |
- name: Create .env file | |
uses: noi-techpark/github-actions/env-file@v2 | |
env: | |
X_SERVER_PORT: 1015 | |
X_COMPOSE_PROJECT_NAME: ${{ env.PROJECT_NAME }} | |
X_DOCKER_IMAGE: ${{ env.DOCKER_IMAGE }} | |
X_DOCKER_TAG: ${{ env.DOCKER_TAG }} | |
X_LOG_APPLICATION_NAME: ${{ env.PROJECT_NAME }} | |
X_ALPINEBITS_PATH: "/AlpineBits" | |
X_ODH_URL: "https://api.tourism.testingmachine.eu/v1" | |
X_ODH_AUTH_URL: "https://auth.opendatahub.testingmachine.eu/auth/realms/noi/protocol/openid-connect/token" | |
X_ODH_AUTH_CLIENT_ID: ${{ secrets.ODH_AUTH_CLIENT_ID_TEST }} | |
X_ODH_AUTH_CLIENT_SECRET: ${{ secrets.ODH_AUTH_CLIENT_SECRET_TEST }} | |
- name: Build and push images | |
uses: noi-techpark/github-actions/docker-build-and-push@v2 | |
with: | |
docker-username: ${{ github.actor }} | |
docker-password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Deploy application | |
uses: noi-techpark/github-actions/docker-deploy@v2 | |
with: | |
hosts: 'test' | |
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
docker-username: 'noi-techpark-bot' | |
docker-password: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} | |
project-name: ${{ env.PROJECT_NAME }} | |
# Deploy prod | |
deploy-prod: | |
runs-on: ubuntu-20.04 | |
if: github.ref == 'refs/heads/prod' | |
needs: test | |
concurrency: deploy-prod | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v2 | |
- name: Create .env file | |
uses: noi-techpark/github-actions/env-file@v2 | |
env: | |
X_SERVER_PORT: 1015 | |
X_COMPOSE_PROJECT_NAME: ${{ env.PROJECT_NAME }} | |
X_DOCKER_IMAGE: ${{ env.DOCKER_IMAGE }} | |
X_DOCKER_TAG: ${{ env.DOCKER_TAG }} | |
X_LOG_APPLICATION_NAME: ${{ env.PROJECT_NAME }} | |
X_ALPINEBITS_PATH: "/AlpineBits" | |
X_ODH_URL: "https://tourism.api.opendatahub.com/v1" | |
X_ODH_AUTH_URL: "https://auth.opendatahub.com/auth/realms/noi/protocol/openid-connect/token" | |
X_ODH_AUTH_CLIENT_ID: ${{ secrets.ODH_AUTH_CLIENT_ID_PROD }} | |
X_ODH_AUTH_CLIENT_SECRET: ${{ secrets.ODH_AUTH_CLIENT_SECRET_PROD }} | |
- name: Build and push images | |
uses: noi-techpark/github-actions/docker-build-and-push@v2 | |
with: | |
docker-username: ${{ github.actor }} | |
docker-password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Deploy application | |
uses: noi-techpark/github-actions/docker-deploy@v2 | |
with: | |
hosts: 'prod' | |
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
docker-username: 'noi-techpark-bot' | |
docker-password: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} | |
project-name: ${{ env.PROJECT_NAME }} |