IT-3921 Add automated image update to fix Trivy findings (#13) #44
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: Run tests and conditionally build container | |
on: | |
push: | |
branches: | |
- '*' | |
tags: | |
- 'v[0-9]+\.[0-9]+\.[0-9]+' | |
pull_request: | |
branches: | |
- '*' | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Static Analysis | |
uses: pre-commit/[email protected] | |
- name: Build Docker Image | |
uses: docker/[email protected] | |
with: | |
context: . | |
build-args: notebook_type=jupyter | |
push: false | |
- name: Install dependencies | |
run: pip install -r requirements.txt -r requirements-dev.txt | |
- name: Run unit tests | |
run: python -m pytest tests/ -s -v | |
docker-build-push-jupyter: | |
if: ${{ github.event_name == 'push' }} | |
needs: [tests] | |
uses: "./.github/workflows/docker_build_push.yml" | |
secrets: inherit | |
with: | |
NOTEBOOK_TYPE: jupyter | |
docker-build-push-rstudio: | |
if: ${{ github.event_name == 'push' }} | |
needs: [tests] | |
uses: "./.github/workflows/docker_build_push.yml" | |
secrets: inherit | |
with: | |
NOTEBOOK_TYPE: rstudio | |
... |