diff --git a/Dockerfile b/Dockerfile index dbbe008..5d745d9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ FROM node:25-alpine3.23@sha256:636c5bc8fa6a7a542bc99f25367777b0b3dd0db7d1ca3959d14137a1ac80bde2 -RUN apk add --no-cache bash>5.0.16-r0 git>2.26.0-r0 curl +RUN apk add --no-cache bash>5.0.16-r0 git>2.26.0-r0 curl jq COPY entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] diff --git a/action.yml b/action.yml index 6a6f3e2..080b253 100644 --- a/action.yml +++ b/action.yml @@ -55,5 +55,3 @@ runs: - ${{ inputs.base-branch }} - ${{ inputs.file-extension }} - ${{ inputs.file-path }} - env: - REPO_PRIVATE: ${{ github.event.repository.private }} diff --git a/entrypoint.sh b/entrypoint.sh index 71d5c29..4dc12bd 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -7,6 +7,9 @@ UPSTREAM="gaurav-nelson/github-action-markdown-link-check" ACTION_REPO="${GITHUB_ACTION_REPOSITORY:-}" DOCS_URL="https://docs.stepsecurity.io/actions/stepsecurity-maintained-actions" +# determine repo visibility from the GitHub event payload +REPO_PRIVATE=$(jq -r '.repository.private | tostring' "$GITHUB_EVENT_PATH" 2>/dev/null || echo "") + echo "" echo -e "\033[1;36mStepSecurity Maintained Action\033[0m" echo "Secure drop-in replacement for $UPSTREAM"