Skip to content

Commit

Permalink
minor bugs fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
lnxpy committed Nov 19, 2024
1 parent 9aece8f commit 9bc009f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pyaction/action_template/copier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ description:
author_name:
type: str
help: Author's name
placeholder: John Doe
default: John Doe

python_version:
type: float
Expand Down
16 changes: 8 additions & 8 deletions pyaction/action_template/{{action_slug}}/Dockerfile.jinja
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# setting the base-image
# Setting the base-image
FROM python:{{ python_version }}-slim

# Copy only the necessary binaries from uv
Expand All @@ -10,17 +10,17 @@ ENV UV_PROJECT_ENVIRONMENT="/usr/local/"
# Set the working directory to /action
WORKDIR /action

# importing the action
# Import the action
COPY . .

# running the pre-script.sh
RUN [ -f /action/pre-script.sh ] && sh /action/pre-script.sh || true
# Run the pre-script.sh
RUN [ -f pre-script.sh ] && sh pre-script.sh || true

# Install project dependencies first for better caching
RUN uv sync --no-cache
# Install action dependencies
RUN uv sync

# running the post-script.sh
RUN [ -f /action/post-script.sh ] && sh /action/post-script.sh || true
RUN [ -f post-script.sh ] && sh post-script.sh || true

# Specify the command to run main.py with uv
CMD [ "uv", "run", "main.py" ]
CMD [ "uv", "run", "/action/main.py" ]

0 comments on commit 9bc009f

Please sign in to comment.