Skip to content

Commit

Permalink
fix: dockerinstall (#8)
Browse files Browse the repository at this point in the history
Convert to package and install in docker
  • Loading branch information
HCookie authored Oct 17, 2024
1 parent 19a8f49 commit 88e2b52
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ LABEL com.github.actions.name="organizational_contributors" \
org.opencontainers.image.description="GitHub Action that given an organization or repository, produces information about the contributors sorted by the organisation."

WORKDIR /action/workspace
COPY requirements.txt */*.py /action/workspace/
COPY requirements.txt LICENSE pyproject.toml README.md /action/workspace/
COPY contributors /action/workspace/contributors

RUN python3 -m pip install --no-cache-dir -r requirements.txt \
RUN python3 -m pip install --no-cache-dir ./ \
&& apt-get -y update \
&& apt-get -y install --no-install-recommends git=1:2.39.5-0+deb12u1 \
&& rm -rf /var/lib/apt/lists/*
&& rm -rf /var/lib/apt/lists/*

CMD ["/action/workspace/contributors"]
CMD ["contributors"]
ENTRYPOINT ["python3", "-m"]
49 changes: 49 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# https://packaging.python.org/en/latest/guides/writing-pyproject-toml/

[build-system]
requires = [ "setuptools>=60", "setuptools-scm>=8" ]

[project]
name = "contributors"

description = "A package to get contributor information."
keywords = [ "github" ]

license = { file = "LICENSE" }
authors = [
{ name = "HCookie", email = "[email protected]" },
]

requires-python = ">=3.9"

classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]

dynamic = [ "version" ]

dependencies = [
"github3.py==4.0.1",
"python-dotenv==1.0.1",
"requests==2.32.3",

]

optional-dependencies.all = [ ]

optional-dependencies.tests = [
"black==24.10.0",
"flake8==7.1.1",
"mypy==1.11.2",
"mypy-extensions==1.0.0",
"pylint==3.3.1",
"pytest==8.3.3",
"pytest-cov==5.0.0",
"types-requests==2.32.0.20240914",
]

0 comments on commit 88e2b52

Please sign in to comment.