File tree Expand file tree Collapse file tree 7 files changed +151
-1
lines changed
Expand file tree Collapse file tree 7 files changed +151
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Build Docker Image
2+ on :
3+ workflow_call :
4+
5+
6+ jobs :
7+ # Build Docker Image
8+ build :
9+ name : Build Docker Image
10+ runs-on : ubuntu-latest
11+
12+ 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+
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 :
7+
8+ permissions :
9+ contents : read
10+ security-events : write
11+ actions : read
12+
13+ jobs :
14+ # Add Publisher Job here
15+ publish :
16+ uses : ./.github/workflows/publish.yml
17+ secrets : inherit
18+ permissions :
19+ id-token : write
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
9+
10+ permissions :
11+ contents : read
12+ security-events : write
13+ actions : read
14+
15+ jobs:
Original file line number Diff line number Diff line change 1+ name : Publish Artifacts
2+
3+ on :
4+ workflow_call :
5+
6+ jobs :
7+ pypi-publish :
8+ name : Upload Release to PyPI
9+ runs-on : ubuntu-latest
10+ # Specifying a GitHub environment is optional, but strongly encouraged
11+ environment : pypi
12+ steps :
13+ - name : Checkout code
14+ uses : actions/checkout@v4
15+ - name : Install dependencies
16+ run : |
17+ python -m pip install --upgrade pip
18+ pip install -r requirements.txt
19+ - name : Publish package distributions to PyPI
20+ uses : pypa/gh-action-pypi-publish@release/v1
Original file line number Diff line number Diff line change 1+ name : Push Contianer to Docker Hub
2+ on :
3+ workflow_call :
4+
5+
6+ jobs :
7+
8+ docker :
9+ runs-on : ubuntu-latest
10+ steps :
11+ -
12+ name : login to Docker Hub
13+ uses : docker/login-action@v3
14+ with :
15+ username : ${{ secrets.DOCKERHUB_USERNAME }}
16+ password : ${{ secrets.DOCKERHUB_TOKEN }}
17+ -
18+ name : Set up QEMU
19+ uses : docker/setup-buildx-action@v3
20+ -
21+ name : Set up Docker Buildx
22+ uses : docker/setup-buildx-action@v3
23+ -
24+ name : Build and Push
25+ uses : docker/build-push-action@v6
26+ with :
27+ push : true
28+ tags : user/app:latest
29+
Original file line number Diff line number Diff line change 1+ name : Linting and Formating Checks
2+ on :
3+ workflow_call :
4+
5+ jobs :
6+ # Run Pylint and Black formatter
7+ pylint :
8+ name : Run lint and formatting checks with pylint and black
9+ runs-on : ubuntu-latest
10+ strategy :
11+ matrix :
12+ python-version : ["3.12.6"]
13+
14+ steps :
15+ - uses : actions/checkout@v4
16+ - name : ' Setup Python ${{ matrix.python-version}}'
17+ uses : actions/setup-python@v3
18+ with :
19+ python-version : ' ${{ matrix.python-version}}'
20+
21+ - name : Install dependencies
22+ run : |
23+ pip install -r requirements.txt
24+ python -m pip install --upgrade pip
25+
26+ - name : Run pylint
27+ run : pylint .
28+
29+ black :
30+ name : Run black formatter
31+ runs-on : ubuntu-latest
32+ strategy :
33+ matrix :
34+ python-version : ["3.12.6"]
35+
36+ steps :
37+ - uses : actions/checkout@v4
38+ - name : ' Setup Python ${{ matrix.python-version}}'
39+ uses : actions/setup-python@v3
40+ with :
41+ python-version : ' ${{ matrix.python-version}}'
42+
43+ - name : Install dependencies
44+ run : |
45+ pip install -r requirements.txt
46+ python -m pip install --upgrade pip
47+
48+ - name : Run black formatter
49+ run : black .
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ aiohappyeyeballs==2.4.6
22aiohttp == 3.11.13
33aiosignal == 1.3.2
44attrs == 25.1.0
5- audioop-lts == 0.2.1
65discord.py == 2.5.0
76fire == 0.7.0
87frozenlist == 1.5.0
You can’t perform that action at this time.
0 commit comments