diff --git a/.github/actions/next-stats-action/src/index.js b/.github/actions/next-stats-action/src/index.js index d7332d5edc893..f24fe427faf87 100644 --- a/.github/actions/next-stats-action/src/index.js +++ b/.github/actions/next-stats-action/src/index.js @@ -27,7 +27,7 @@ if (!allowedActions.has(actionInfo.actionName) && !actionInfo.isRelease) { ;(async () => { 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( 'SKIP_NEXT_STATS.txt file present, exiting stats generation..' ) diff --git a/.github/actions/next-stats-action/src/prepare/action-info.js b/.github/actions/next-stats-action/src/prepare/action-info.js index 427fee1fd7745..fff1ffc955cb3 100644 --- a/.github/actions/next-stats-action/src/prepare/action-info.js +++ b/.github/actions/next-stats-action/src/prepare/action-info.js @@ -56,7 +56,9 @@ module.exports = function actionInfo() { isLocal: LOCAL_STATS, commitId: null, issueId: ISSUE_ID, - isRelease: releaseTypes.has(GITHUB_ACTION), + isRelease: + GITHUB_REPOSITORY === 'vercel/next.js' && + (GITHUB_REF || '').includes('canary'), } // get comment diff --git a/release-stats.sh b/release-stats.sh index 406d1620f084e..975aaf96ebb56 100755 --- a/release-stats.sh +++ b/release-stats.sh @@ -4,7 +4,7 @@ git describe --exact-match if [[ ! $? -eq 0 ]];then echo "Nothing to publish, exiting.." - touch SKIP_NEXT_STATS.txt + touch .github/actions/next-stats-action/SKIP_NEXT_STATS.txt exit 0; fi