FROM node:20-slim

RUN apt-get update && apt-get install -y --no-install-recommends \
    git \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /action

COPY app/ /action/app/
COPY entrypoint.sh /entrypoint.sh

RUN cd /action/app && npm install && \
    chmod +x /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
