File tree Expand file tree Collapse file tree 6 files changed +75
-68
lines changed
Expand file tree Collapse file tree 6 files changed +75
-68
lines changed Original file line number Diff line number Diff line change 1- name : Build Docker Image
1+ name : Build Python Project
22on :
33 workflow_call :
44
55
66jobs :
7- # Build Docker Image
87 build :
9- name : Build Docker Image
8+ name : Install dependencies and build project
109 runs-on : ubuntu-latest
11-
1210 steps :
13- - name : Checkout code
14- uses : actions/checkout@v4
15-
16- - name : Build Docker Image
17- run : |
18- docker build -t awesome-fastapi:${{ github.sha }} .
19-
11+ - uses : actions/checkout@v4
12+ - name : Install dependencies
13+ run : |
14+ pip install -r requirements.txt
15+ python -m pip install --upgrade pip
16+ - name : Build Project
17+ run : |
18+ python -m build
Original file line number Diff line number Diff line change 1- # name: Main Workflow
2- # on:
3- # push:
4- # branches:
5- # - main
6- # workflow_dispatch:
1+ name : Main Workflow
2+ on :
3+ push :
4+ branches :
5+ - main
6+ workflow_dispatch :
77
8- # jobs:
9- # # Add Publisher Job here
10- # publish:
11- # uses: ./.github/workflows/publish.yml
12- # secrets: inherit
13-
8+ jobs :
9+ # Add Publisher Job here
10+ build :
11+ uses : ./.github/workflows/build.yml
12+ secrets : inherit
13+ syntax :
14+ uses : ./.github/workflows/syntax.yml
15+ secrets : inherit
16+ scan :
17+ uses : ./.github/workflows/scan.yml
18+ secrets : inherit
Original file line number Diff line number Diff line change 1- name : PR Workflow
2- on :
3- pull_request :
4- types :
5- - opened
6- - edited
7- - synchronize
8- - reopened
1+ # name: PR Workflow
2+ # on:
3+ # pull_request:
4+ # types:
5+ # - opened
6+ # - edited
7+ # - synchronize
8+ # - reopened
99
10- permissions :
11- contents : read
12- security-events : write
13- actions : read
10+ # permissions:
11+ # contents: read
12+ # security-events: write
13+ # actions: read
1414
1515
16- jobs:
16+ # jobs:
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Security Scanning
2+
3+ on :
4+ workflow_call :
5+
6+ jobs :
7+ generate-sbom :
8+ runs-on : ubuntu-latest
9+
10+ steps :
11+ - name : Checkout code
12+ uses : actions/checkout@v4
13+
14+ - name : Set up Python
15+ uses : actions/setup-python@v5
16+ with :
17+ python-version : " 3.x"
18+
19+ - name : Install dependencies
20+ run : |
21+ python -m pip install --upgrade pip
22+ pip install -r requirements.txt
23+
24+ - name : Generate SBOM with Trivy
25+ run : |
26+ docker run --rm -v $(pwd):/app aquasec/trivy:latest fs --format cyclonedx --output /app/sbom.json /app
27+
28+ - name : Upload SBOM artifact
29+ uses : actions/upload-artifact@v2
30+ with :
31+ name : sbom
32+ path : sbom.json
Original file line number Diff line number Diff line change 1- name : Linting and Formating Checks
1+ name : Linting & Formating Checks
22on :
33 workflow_call :
44
1414 steps :
1515 - uses : actions/checkout@v4
1616 - name : ' Setup Python ${{ matrix.python-version}}'
17- uses : actions/setup-python@v3
17+ uses : actions/setup-python@v5
1818 with :
1919 python-version : ' ${{ matrix.python-version}}'
2020
3636 steps :
3737 - uses : actions/checkout@v4
3838 - name : ' Setup Python ${{ matrix.python-version}}'
39- uses : actions/setup-python@v3
39+ uses : actions/setup-python@v5
4040 with :
4141 python-version : ' ${{ matrix.python-version}}'
4242
You can’t perform that action at this time.
0 commit comments