File tree Expand file tree Collapse file tree 1 file changed +50
-0
lines changed
Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Manual Docker Build and Push
2+
3+ on :
4+ workflow_dispatch : # Allows manual triggering
5+
6+ jobs :
7+ build-and-push :
8+ runs-on : ubuntu-latest
9+ steps :
10+ - name : Checkout repository
11+ uses : actions/checkout@v4
12+
13+ - name : Log in to Docker Hub
14+ uses : docker/login-action@v3
15+ with :
16+ username : ${{ secrets.DOCKERHUB_USERNAME }}
17+ password : ${{ secrets.DOCKERHUB_TOKEN }}
18+
19+ - name : Build and push Docker image
20+ uses : docker/build-push-action@v5
21+ with :
22+ context : .
23+ push : true
24+ tags : sethblack/python-seo-analyzer:latest # Use your Docker Hub username
25+
26+ publish-to-pypi :
27+ needs : build-and-push # Optional: Make this job depend on the Docker build
28+ runs-on : ubuntu-latest
29+ steps :
30+ - name : Checkout repository
31+ uses : actions/checkout@v4
32+
33+ - name : Set up Python
34+ uses : actions/setup-python@v4
35+ with :
36+ python-version : ' 3.x' # Use an appropriate Python version
37+
38+ - name : Install dependencies
39+ run : |
40+ python -m pip install --upgrade pip
41+ pip install build twine
42+
43+ - name : Build package
44+ run : python -m build
45+
46+ - name : Publish package to PyPI
47+ uses : pypa/gh-action-pypi-publish@release/v1
48+ with :
49+ user : __token__
50+ password : ${{ secrets.PYPI_API_TOKEN }}
You can’t perform that action at this time.
0 commit comments