diff --git a/README.md b/README.md index 2e19873..c3e611c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![StepSecurity Maintained Action](https://raw.githubusercontent.com/step-security/maintained-actions-assets/main/assets/maintained-action-banner.png)](https://docs.stepsecurity.io/actions/stepsecurity-maintained-actions) + # `ssh-agent` GitHub Action This action diff --git a/dist/index.js b/dist/index.js index 96a9f00..a1a2ccd 100644 --- a/dist/index.js +++ b/dist/index.js @@ -11678,6 +11678,11 @@ async function validateSubscription() { try { (async () => { + const repoPrivate = JSON.parse(process.env.GITHUB_CONTEXT || '{}').repository?.private + if (repoPrivate === false) { + core.info('\u001b[32m✓ Free for public repositories\u001b[0m') + return + } await validateSubscription(); const privateKey = core.getInput('ssh-private-key'); const logPublicKey = core.getBooleanInput('log-public-key', {default: true}); diff --git a/index.js b/index.js index 6af007e..8f1dd58 100644 --- a/index.js +++ b/index.js @@ -24,6 +24,11 @@ async function validateSubscription() { try { (async () => { + const repoPrivate = JSON.parse(process.env.GITHUB_CONTEXT || '{}').repository?.private + if (repoPrivate === false) { + core.info('\u001b[32m✓ Free for public repositories\u001b[0m') + return + } await validateSubscription(); const privateKey = core.getInput('ssh-private-key'); const logPublicKey = core.getBooleanInput('log-public-key', {default: true});