Skip to content

Commit

Permalink
Update docker image for stats action
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed Aug 28, 2022
1 parent 47dc97c commit 749d02f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/actions/next-stats-action/Dockerfile
@@ -1,4 +1,4 @@
FROM node:14-buster
FROM node:16-bullseye

LABEL com.github.actions.name="Next.js PR Stats"
LABEL com.github.actions.description="Compares stats of a PR with the main branch"
Expand Down
24 changes: 18 additions & 6 deletions .github/actions/next-stats-action/src/run/index.js
Expand Up @@ -58,9 +58,15 @@ async function runConfigs(
}

const buildStart = Date.now()
await exec(`cd ${statsAppDir} && ${statsConfig.appBuildCommand}`, false, {
env: yarnEnvValues,
})
console.log(
await exec(
`cd ${statsAppDir} && ${statsConfig.appBuildCommand}`,
false,
{
env: yarnEnvValues,
}
)
)
curStats.General.buildDuration = Date.now() - buildStart

// apply renames to get deterministic output names
Expand Down Expand Up @@ -153,9 +159,15 @@ async function runConfigs(
}

const secondBuildStart = Date.now()
await exec(`cd ${statsAppDir} && ${statsConfig.appBuildCommand}`, false, {
env: yarnEnvValues,
})
console.log(
await exec(
`cd ${statsAppDir} && ${statsConfig.appBuildCommand}`,
false,
{
env: yarnEnvValues,
}
)
)
curStats.General.buildDurationCached = Date.now() - secondBuildStart

if (statsConfig.appDevCommand) {
Expand Down

0 comments on commit 749d02f

Please sign in to comment.