diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b00bc956..79ddcaf1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -67,4 +67,8 @@ cat my-token.txt | podman secret create repo-secret - ```bash podman run --entrypoint /entrypoint.sh --secret repo-secret,type=env,target=GITHUB_TOKEN --env-file=envfile -v my-trestle-space:/data -w /data localhost:5000/trestlebot:latest -``` \ No newline at end of file +``` + +### Adding a new action + +First, create an entrypoint script for the new action in the `trestlebot/infra` directory. Then add the action by creating a new directory in the `actions` directory with an `action.yml` that references your new entrypoint. \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 72588f2d..11020afc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -64,9 +64,9 @@ RUN microdnf install -y git \ && microdnf clean all \ && rm -rf /var/lib/apt/lists/* -COPY ./entrypoint.sh / +COPY ./trestlebot/infra/entrypoints/* /entrypoints/ -RUN chmod +x /entrypoint.sh +RUN for f in /entrypoints/*; do chmod +x $f; done ENTRYPOINT ["python3.9", "-m" , "trestlebot"] CMD ["--help"] diff --git a/action.yml b/actions/trestle-bot/action.yml similarity index 98% rename from action.yml rename to actions/trestle-bot/action.yml index f94013b3..3ca51a0f 100644 --- a/action.yml +++ b/actions/trestle-bot/action.yml @@ -81,7 +81,7 @@ outputs: runs: using: "docker" - image: "Dockerfile" + image: "quay.io/continuouscompliance/trestlebot:latest" entrypoint: "/entrypoint.sh" env: GITHUB_TOKEN: ${{ inputs.github_token }} diff --git a/entrypoint.sh b/entrypoints/autofix.sh similarity index 100% rename from entrypoint.sh rename to entrypoints/autofix.sh