File tree Expand file tree Collapse file tree 5 files changed +253
-70
lines changed
Expand file tree Collapse file tree 5 files changed +253
-70
lines changed Original file line number Diff line number Diff line change 1- # Set the base image to the minimal Python 3.12 slim image
1+ # Setting the base- image
22FROM python:3.12-slim
33
44# Copy only the necessary binaries from uv
55COPY --from=ghcr.io/astral-sh/uv:0.5.1 /uv /uvx /bin/
66
7- # Set environment variable early to take advantage of layer caching
8- ENV UV_PROJECT_ENVIRONMENT="/usr/local/"
9-
107# Set the working directory to /action
118WORKDIR /action
129
13- # importing the action
10+ # Import the action
1411COPY . .
1512
16- # running the script.sh
17- RUN if [ -f script.sh ]; then sh script.sh; fi
13+ # Run the pre-script.sh
14+ RUN [ -f pre-script.sh ] && sh pre-script.sh || true
15+
16+ # Install action dependencies
17+ RUN uv sync --no-install-project --no-cache
1818
19- # Install project dependencies first for better caching
20- RUN uv sync --frozen --no-cache
19+ # running the post-script.sh
20+ RUN [ -f post-script.sh ] && sh post-script.sh || true
2121
2222# Specify the command to run main.py with uv
23- CMD [ "uv" , "run" , "main.py" ]
23+ CMD [ "uv" , "run" , "/action/ main.py" ]
Original file line number Diff line number Diff line change 3131 uses : actions/checkout@v4
3232
3333 - name : Updating the badge
34- uses : lnxpy/pypi-chart-badge@v1.1
34+ uses : lnxpy/pypi-chart-badge@v1.2
3535 with :
3636 package_name : ' <PACKAGE-NAME>'
3737
Original file line number Diff line number Diff line change 22from pathlib import Path
33
44from pyaction import PyAction
5- from pyaction .workflow import annotations as AN
5+ from pyaction .workflow import annotations as A
66
77from chart import Badge
88from pypi import PyPI
@@ -21,13 +21,13 @@ def get_or_create_path(path: str) -> str:
2121 """
2222
2323 if not os .path .exists (path ):
24- AN .warning (f"Couldn't find `{ path } ` path in the repo. Creating it!" )
24+ A .warning (f"Couldn't find `{ path } ` path in the repo. Creating it!" )
2525 os .makedirs (path )
2626
2727 return path
2828
2929
30- @workflow .action ()
30+ @workflow .action
3131def action (
3232 package_name : str ,
3333 badge_width : int ,
Original file line number Diff line number Diff line change 11[project ]
22name = " pypi-chart-badge"
3- version = " 1.1 .0"
3+ version = " 1.2 .0"
44description = " PyPI Chart Badge Generator"
55readme = " README.md"
66requires-python = " >=3.12"
77dependencies = [
88 " kaleido==0.2.1" ,
99 " pandas==2.2.1" ,
1010 " plotly==5.24.1" ,
11- " pyaction==0.7.2 " ,
11+ " pyaction==0.8.1 " ,
1212 " requests==2.32.3" ,
1313]
14+
15+ [project .optional-dependencies ]
16+ cli = [" pyaction[cli]==0.8.1" ]
You can’t perform that action at this time.
0 commit comments