Unverified Commit 100a1d3a authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Update release stats workflow (#17580)

Follow-up to https://github.com/vercel/next.js/pull/17533 this makes sure the file used to signal release stats should be skipped for a non-release merge is created in a location that is accessible by the stats action and also updates the release action info detection for the new workflow
parent b42be175
...@@ -27,7 +27,7 @@ if (!allowedActions.has(actionInfo.actionName) && !actionInfo.isRelease) { ...@@ -27,7 +27,7 @@ if (!allowedActions.has(actionInfo.actionName) && !actionInfo.isRelease) {
;(async () => { ;(async () => {
try { try {
if (await fs.pathExists(path.join(process.cwd(), 'SKIP_NEXT_STATS.txt'))) { if (await fs.pathExists(path.join(__dirname, '../SKIP_NEXT_STATS.txt'))) {
console.log( console.log(
'SKIP_NEXT_STATS.txt file present, exiting stats generation..' 'SKIP_NEXT_STATS.txt file present, exiting stats generation..'
) )
......
...@@ -56,7 +56,9 @@ module.exports = function actionInfo() { ...@@ -56,7 +56,9 @@ module.exports = function actionInfo() {
isLocal: LOCAL_STATS, isLocal: LOCAL_STATS,
commitId: null, commitId: null,
issueId: ISSUE_ID, issueId: ISSUE_ID,
isRelease: releaseTypes.has(GITHUB_ACTION), isRelease:
GITHUB_REPOSITORY === 'vercel/next.js' &&
(GITHUB_REF || '').includes('canary'),
} }
// get comment // get comment
......
...@@ -4,7 +4,7 @@ git describe --exact-match ...@@ -4,7 +4,7 @@ git describe --exact-match
if [[ ! $? -eq 0 ]];then if [[ ! $? -eq 0 ]];then
echo "Nothing to publish, exiting.." echo "Nothing to publish, exiting.."
touch SKIP_NEXT_STATS.txt touch .github/actions/next-stats-action/SKIP_NEXT_STATS.txt
exit 0; exit 0;
fi fi
......
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