Skip to content

liveness checks

liveness checks #52

# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions
name: Web Api - build latest
on:
push:
branches:
- "main"
paths:
- "src/web-api/**"
workflow_dispatch:
jobs:
test:
runs-on: "ubuntu-latest"
env:
JWT_SECRET: SOMEJWTSECRET
steps:
- uses: actions/checkout@v3
- name: Test api
working-directory: ./src/web-api
run: |
npm run build:test -- --build-arg NPM_TOKEN=${{ secrets.NPM_TOKEN }} && npm run docker:test
build:
runs-on: "ubuntu-latest"
needs: test
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ secrets.CONTAINER_USERNAME }}
password: ${{ secrets.CONTAINER_PASSWORD }}
- name: Build and push container image to registry
uses: docker/build-push-action@v3
with:
push: true
tags: ${{ secrets.REPOSITORY_NAME }}/ppo-api:latest
context: ./src/web-api
build-args: |
NPM_TOKEN=${{ secrets.NPM_TOKEN }}