Skip to content

Commit

Permalink
ci: use nx head env variable by default (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcdo29 committed Jun 11, 2023
2 parents 94bf47c + cea1162 commit 24ec7c5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions libs/docker/src/executors/build/executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ export default async function runExecutor(
logger.verbose(
`Docker cache path was evaluated to ${cachePath}. This was automatically generated.`
);
const gCommit = execSync('git log -n 1 --format="%h"')
.toString()
.replace('\n', '');
const gCommit =
process.env.NX_HEAD ??
execSync('git log -n 1 --format="%h"').toString().replace('\n', '');
logger.verbose(`Git Commit was determined to be ${gCommit}`);
const dockerNamespace = options.dockerNamespace ?? `jmcdo29`;
const tagPrefix = options.tag ?? `${scope}-${project}:latest`;
const tags = [
Expand Down

0 comments on commit 24ec7c5

Please sign in to comment.