diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index dca8cef..9f475db 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -28,6 +28,6 @@ jobs: - name: Validate tag run: bun run validate - with: + env: github-token: ${{ secrets.GITHUB_TOKEN }} commit-sha: ${{ github.event.pull_request.head.sha }} \ No newline at end of file diff --git a/scripts/validateTags/src/index.ts b/scripts/validateTags/src/index.ts index f0143e7..92bdba8 100644 --- a/scripts/validateTags/src/index.ts +++ b/scripts/validateTags/src/index.ts @@ -1,13 +1,12 @@ import { context } from '@actions/github'; -import { getInput } from '@actions/core'; interface Tag { keywords: string[]; content: string; } -const githubToken = getInput('github-token'); -const commitSha = getInput('commit-sha'); +const githubToken = process.env['github-token']; +const commitSha = process.env['commit-sha']; const codeBlockRegex = /(`{1,3}).+?\1/gs; const urlRegex = /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&\/\/=]*)/gi;