diff --git a/Dockerfile b/Dockerfile index 2484f63..8f86500 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,6 +14,7 @@ COPY src/requirements.txt ./ RUN pip install -r requirements.txt COPY src/entrypoint /usr/local/bin/ +COPY src/entrypoint.sh /usr/local/bin/ COPY src/add-to-wiki /usr/local/bin/ COPY src/default.md.j2 /var/ diff --git a/action.yml b/action.yml index a9ba5f6..44cec4b 100644 --- a/action.yml +++ b/action.yml @@ -6,6 +6,10 @@ description: > Publish diff coverage report as PR comment, and create a coverage badge to display on the readme. inputs: + SSH_PRIVATE_KEY: + description: > + SSH key to access privare repositories + required: true CLOUDFLARE_TOKEN_ID: description: > A Cloudflare token id to work with git repository behind CF @@ -69,3 +73,5 @@ runs: MINIMUM_ORANGE: ${{ inputs.MINIMUM_ORANGE }} TOKEN_ID: ${{ inputs.CLOUDFLARE_TOKEN_ID }} TOKEN_SECRET: ${{ inputs.CLOUDFLARE_TOKEN_SECRET }} + SSH_PRIVATE_KEY: ${{ inputs.SSH_PRIVATE_KEY }} + entrypoint: "entrypoint.sh" diff --git a/src/entrypoint.sh b/src/entrypoint.sh new file mode 100644 index 0000000..6f08ff1 --- /dev/null +++ b/src/entrypoint.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +eval $(ssh-agent -s) +mkdir -p ~/.ssh/ && chmod 700 ~/.ssh +echo "$SSH_PRIVATE_KEY" | ssh-add - + +entrypoint \ No newline at end of file