This commit is contained in:
parent
c5e6ac37fa
commit
3b63dda1d8
6
index.js
6
index.js
@ -19,12 +19,10 @@ const path = require("path");
|
|||||||
*/
|
*/
|
||||||
function replacePlaceholders(content) {
|
function replacePlaceholders(content) {
|
||||||
const deployTime = new Date().toISOString();
|
const deployTime = new Date().toISOString();
|
||||||
content = content
|
return content
|
||||||
.replace(/{{gitHash}}/g, process.env.GITHUB_SHA)
|
.replace(/{{gitHash}}/g, process.env.GITHUB_SHA)
|
||||||
.replace(/{{gitRef}}/g, process.env.GITHUB_REF)
|
.replace(/{{gitRef}}/g, process.env.GITHUB_REF)
|
||||||
.replace(/{{deployTime}}/g, deployTime);
|
.replace(/{{deployTime}}/g, deployTime);
|
||||||
core.info(content);
|
|
||||||
return content;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -41,8 +39,6 @@ function replacePlaceholders(content) {
|
|||||||
async function readReplaceAndWriteFiles(pattern, prefix) {
|
async function readReplaceAndWriteFiles(pattern, prefix) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const globPattern = prefix ? path.join(prefix, pattern) : pattern;
|
const globPattern = prefix ? path.join(prefix, pattern) : pattern;
|
||||||
core.info("globPattern");
|
|
||||||
core.info(globPattern);
|
|
||||||
|
|
||||||
glob(globPattern, async (err, files) => {
|
glob(globPattern, async (err, files) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user