feat: show commit SHA in footer with link to repo commit
Build & Push Portfolio Image / build-push (push) Successful in 2m42s
Build & Push Portfolio Image / build-push (push) Successful in 2m42s
This commit is contained in:
+8
-1
@@ -1,7 +1,14 @@
|
||||
const { execSync } = require('child_process');
|
||||
|
||||
const commitSha = process.env.COMMIT_SHA
|
||||
|| (() => { try { return execSync('git rev-parse --short HEAD').toString().trim(); } catch { return 'dev'; } })();
|
||||
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
output: 'standalone',
|
||||
env: {
|
||||
NEXT_PUBLIC_COMMIT_SHA: commitSha,
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = nextConfig;
|
||||
// trigger ci 2026年 8月31日 星期一 17时28分38秒 PDT
|
||||
|
||||
Reference in New Issue
Block a user