Skip to content

Fix workflow: Update FastAPI dependencies and fix static file paths #3

Fix workflow: Update FastAPI dependencies and fix static file paths

Fix workflow: Update FastAPI dependencies and fix static file paths #3

name: commit-stage-monolith
on:
push:
branches: [ "main" ]
paths:
- 'monolith/**'
- '.github/workflows/commit-stage-monolith.yml'
pull_request:
branches: [ "main" ]
paths:
- 'monolith/**'
- '.github/workflows/commit-stage-monolith.yml'
workflow_dispatch:
concurrency:
group: commit-stage-monolith-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
outputs:
image-latest-url: ${{ steps.publish.outputs.image-latest-url }}
image-digest-url: ${{ steps.publish.outputs.image-digest-url }}
permissions:
contents: read
packages: write
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
working-directory: monolith
- name: Run Python Tests
run: |
pytest src/test/python/ -v
working-directory: monolith
- name: Run Python Linting
run: |
flake8 src/main/python/ --max-line-length=100 --extend-ignore=E203,W503
black --check src/main/python/
isort --check-only src/main/python/
working-directory: monolith
continue-on-error: true
- name: Publish Docker Image
id: publish
uses: optivem/publish-docker-image-action@v1
with:
working-directory: monolith
image-name: monolith
registry: ghcr.io
registry-username: ${{ github.actor }}
image-namespace: ${{ github.repository }}
image-latest-tag: latest
commit-sha: ${{ github.sha }}
dockerfile: Dockerfile
env:
REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
summary:
needs: build
runs-on: ubuntu-latest
if: always()
steps:
- name: Commit Stage Summary
uses: optivem/summarize-commit-stage-action@v1
with:
stage-result: ${{ needs.build.result }}
success-artifact-url: ${{ needs.build.outputs.image-latest-url }}