Skip to content

Commit 256a375

Browse files
committed
fix: subscription check code github context access fixed
1 parent d952f9c commit 256a375

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
FROM node:25-alpine3.23@sha256:636c5bc8fa6a7a542bc99f25367777b0b3dd0db7d1ca3959d14137a1ac80bde2
2-
RUN apk add --no-cache bash>5.0.16-r0 git>2.26.0-r0 curl
2+
RUN apk add --no-cache bash>5.0.16-r0 git>2.26.0-r0 curl jq
33
COPY entrypoint.sh /entrypoint.sh
44
RUN chmod +x /entrypoint.sh
55
ENTRYPOINT ["/entrypoint.sh"]

action.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ inputs:
4444

4545
runs:
4646
using: 'docker'
47-
image: 'docker://ghcr.io/step-security/github-action-markdown-link-check:v1.0.18@sha256:aa19375b475db47b6204897e5ed6b1cca5bc51e68b9d4cfc01178771719ba5d3' #v1.0.18
47+
image: 'Dockerfile'
4848
args:
4949
- ${{ inputs.use-quiet-mode }}
5050
- ${{ inputs.use-verbose-mode }}
@@ -55,5 +55,3 @@ runs:
5555
- ${{ inputs.base-branch }}
5656
- ${{ inputs.file-extension }}
5757
- ${{ inputs.file-path }}
58-
env:
59-
REPO_PRIVATE: ${{ github.event.repository.private }}

entrypoint.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ UPSTREAM="gaurav-nelson/github-action-markdown-link-check"
77
ACTION_REPO="${GITHUB_ACTION_REPOSITORY:-}"
88
DOCS_URL="https://docs.stepsecurity.io/actions/stepsecurity-maintained-actions"
99

10+
# determine repo visibility from the GitHub event payload
11+
REPO_PRIVATE=$(jq -r '.repository.private | tostring' "$GITHUB_EVENT_PATH" 2>/dev/null || echo "")
12+
1013
echo ""
1114
echo -e "\033[1;36mStepSecurity Maintained Action\033[0m"
1215
echo "Secure drop-in replacement for $UPSTREAM"

0 commit comments

Comments
 (0)