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
2
2
FROM python:3.12-slim
3
3
4
4
# Copy only the necessary binaries from uv
5
5
COPY --from=ghcr.io/astral-sh/uv:0.5.1 /uv /uvx /bin/
6
6
7
- # Set environment variable early to take advantage of layer caching
8
- ENV UV_PROJECT_ENVIRONMENT="/usr/local/"
9
-
10
7
# Set the working directory to /action
11
8
WORKDIR /action
12
9
13
- # importing the action
10
+ # Import the action
14
11
COPY . .
15
12
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
18
18
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
21
21
22
22
# 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 31
31
uses : actions/checkout@v4
32
32
33
33
- name : Updating the badge
34
- uses : lnxpy/pypi-chart-badge@v1.1
34
+ uses : lnxpy/pypi-chart-badge@v1.2
35
35
with :
36
36
package_name : ' <PACKAGE-NAME>'
37
37
Original file line number Diff line number Diff line change 2
2
from pathlib import Path
3
3
4
4
from pyaction import PyAction
5
- from pyaction .workflow import annotations as AN
5
+ from pyaction .workflow import annotations as A
6
6
7
7
from chart import Badge
8
8
from pypi import PyPI
@@ -21,13 +21,13 @@ def get_or_create_path(path: str) -> str:
21
21
"""
22
22
23
23
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!" )
25
25
os .makedirs (path )
26
26
27
27
return path
28
28
29
29
30
- @workflow .action ()
30
+ @workflow .action
31
31
def action (
32
32
package_name : str ,
33
33
badge_width : int ,
Original file line number Diff line number Diff line change 1
1
[project ]
2
2
name = " pypi-chart-badge"
3
- version = " 1.1 .0"
3
+ version = " 1.2 .0"
4
4
description = " PyPI Chart Badge Generator"
5
5
readme = " README.md"
6
6
requires-python = " >=3.12"
7
7
dependencies = [
8
8
" kaleido==0.2.1" ,
9
9
" pandas==2.2.1" ,
10
10
" plotly==5.24.1" ,
11
- " pyaction==0.7.2 " ,
11
+ " pyaction==0.8.1 " ,
12
12
" requests==2.32.3" ,
13
13
]
14
+
15
+ [project .optional-dependencies ]
16
+ cli = [" pyaction[cli]==0.8.1" ]
You can’t perform that action at this time.
0 commit comments