Unverified Commit 1283270a authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Update env variable for fonts data workflow (#53701)

Removes temporary token in favor of permanent one also updates diffing logic.
Co-authored-by: 's avatarSteven <229881+styfle@users.noreply.github.com>
parent 9035f14d
......@@ -37,4 +37,4 @@ jobs:
shell: bash
run: node scripts/update-fonts-data-workflow.js
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_PULL_REQUESTS_TMP }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_PULL_REQUESTS }}
......@@ -17,18 +17,22 @@ async function main() {
await exec(`node scripts/update-google-fonts.js`)
const changes = await exec('git status')
if (!changes.stdout.includes('Changes not staged')) {
console.log('No changes found', changes)
return
}
await exec(`git config user.name "vercel-release-bot"`)
await exec(`git config user.email "infra+release@vercel.com"`)
await exec(`git checkout -b ${branchName}`)
await exec(`git add -A`)
await exec(`git commit --message ${branchName}`)
const changesResult = await exec(`git diff HEAD~ --name-only`)
const changedFiles = changesResult.stdout
.split('\n')
.filter((line) => line.trim())
if (changedFiles.length === 0) {
console.log('No files changed skipping.')
return
}
await exec(`git push origin ${branchName}`)
const repo = 'next.js'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment