Skip to content

Merge branch 'remove-flyio' #74

Merge branch 'remove-flyio'

Merge branch 'remove-flyio' #74

# 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@v4
- run: echo "${{ secrets.NPMRC }}" > src/web-api/.npmrc
- name: Test api
working-directory: ./src/web-api
run: |
npm run docker:test
build:
runs-on: "ubuntu-latest"
needs: test
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to registry
uses: docker/login-action@v3
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@v5
with:
push: true
tags: ${{ secrets.REPOSITORY_NAME }}/ppo-api:${{ github.sha }} ,${{ secrets.REPOSITORY_NAME }}/ppo-api:latest
context: ./src/web-api
secrets: |
npmrc=${{ secrets.NPMRC }}