File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ .git
2+ .github
3+ venv
4+ dist
5+ ** /* .egg-info
Original file line number Diff line number Diff line change 1313 runs-on : ubuntu-latest
1414
1515 steps :
16- - uses : actions/checkout@v3
16+ - name : Checkout
17+ uses : actions/checkout@v3
1718
1819 - name : Set up Python
1920 uses : actions/setup-python@v3
3536 with :
3637 user : __token__
3738 password : ${{ secrets.TEST_PYPI_API_TOKEN }}
38- repository_url : https://test.pypi.org/legacy/
39+ repository_url : https://test.pypi.org/legacy/
40+
41+ deploy-docker :
42+ runs-on : ubuntu-latest
43+ if : github.ref_type == 'tag'
44+
45+ needs : deploy-pypi
46+ steps :
47+ - name : Checkout
48+ uses : actions/checkout@v3
49+
50+ - name : Login to Docker Hub
51+ uses : docker/login-action@v2
52+ with :
53+ username : ${{ secrets.DOCKER_USER }}
54+ password : ${{ secrets.DOCKER_TOKEN }}
55+
56+ - name : Extract metadata (tags, labels) for Docker
57+ id : meta
58+ uses : docker/metadata-action@v4
59+ with :
60+ images : sancherepan/repo-reader
61+ flavor : latest=true
62+ tags : type=semver,pattern={{version}}
63+
64+
65+ - name : Build and push
66+ uses : docker/build-push-action@v3
67+ with :
68+ context : .
69+ file : docker/Dockerfile
70+ push : true
71+ tags : ${{ steps.meta.outputs.tags }}
72+ labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change @@ -4,11 +4,16 @@ This is a simple example package that can be used to get basic info on GitHub re
44
55# Installation
66
7- Install the python package:
8- ```
7+ Python package:
8+ ``` commandline
99python -m pip install --index-url https://test.pypi.org/simple/ repo_reader_sancherepan
1010```
1111
12+ Docker image:
13+ ``` commandline
14+ docker pull sancherepan/repo-reader
15+ docker run -it --rm sancherepan/repo-reader read-repos --help
16+ ```
1217
1318# Usage
1419
@@ -24,3 +29,8 @@ In command line:
2429``` commandline
2530read-repos your_github_auth_token github_repo_group_name
2631```
32+
33+ In docker:
34+ ``` commandline
35+ docker run -it --rm sancherepan/repo-reader read-repos your_github_auth_token github_repo_group_name
36+ ```
Original file line number Diff line number Diff line change 1- # ToDo: write Dockerfile
1+ FROM python:3.11
2+
3+ COPY . /src
4+
5+ RUN pip install /src && rm -rf /src
6+
7+ CMD ["read-repos" , "-h" ]
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44
55[project ]
66name = " repo_reader_sancherepan"
7- version = " 0.2.1 "
7+ version = " 0.3.0 "
88authors = [
99 { name =" SAnCherepan" , email =" sivkinpunk@gmail.com" },
1010]
@@ -15,12 +15,14 @@ requires-python = ">=3.11"
1515classifiers = [
1616 " Development Status :: 2 - Pre-Alpha" ,
1717 " Programming Language :: Python :: 3.11" ,
18- " License :: OSI Approved :: MIT License" ,
19- " Operating System :: OS Independent" ,
18+ " License :: OSI Approved :: MIT License"
19+ ]
20+ dependencies = [
21+ " requests"
2022]
2123
2224[project .urls ]
2325"Homepage" = " https://github.com/sancherepan/test-code"
2426
2527[project .scripts ]
26- read-repos = " repo_reader_sancherepan.print_repos_info:main"
28+ read-repos = " repo_reader_sancherepan.print_repos_info:main"
You can’t perform that action at this time.
0 commit comments