chore(validateTags): fix, use env

This commit is contained in:
xHyroM 2022-07-16 15:41:10 +02:00
parent de8a1e27f1
commit 33f4111c6e
2 changed files with 3 additions and 4 deletions

View file

@ -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 }}

View file

@ -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;