From 33f4111c6e378ad3e42ac6d023c10d0a27f6fd43 Mon Sep 17 00:00:00 2001 From: xHyroM Date: Sat, 16 Jul 2022 15:41:10 +0200 Subject: [PATCH] chore(validateTags): fix, use env --- .github/workflows/validate.yml | 2 +- scripts/validateTags/src/index.ts | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) 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;