diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cbc4fe9..f788422 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,3 +26,16 @@ jobs: - name: Run tests run: | python -m unittest test_sbg.py + + docker_build: + runs-on: ubuntu-latest + needs: build + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Build Docker image + uses: docker/build-push-action@v5 + with: + context: . + push: false + tags: sbg-gitlab-cloner:latest diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3f1858d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +# Use an official Python runtime as a parent image +FROM python:3.13-slim + +# Install git +RUN apt-get update && apt-get install -y --no-install-recommends git && rm -rf /var/lib/apt/lists/* + +# Set the working directory in the container +WORKDIR /app + +# Copy the requirements file into the container at /app +COPY requirements.txt . + +# Install any needed packages specified in requirements.txt +RUN pip install --no-cache-dir -r requirements.txt + +# Copy the script into the container at /app +COPY sbg.py . + +# Make the script executable +RUN chmod +x sbg.py + +# Set the entrypoint to run the script +ENTRYPOINT ["./sbg.py"]