From c513cdeccc6468ca2037786917e6fb1903f32d3b Mon Sep 17 00:00:00 2001 From: gautamkrishnar Date: Sun, 18 Oct 2020 14:17:02 +0530 Subject: [PATCH] pull the latest code before making new changes, fixes: #36 --- blog-post-workflow.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/blog-post-workflow.js b/blog-post-workflow.js index 5e59a50..54f0479 100644 --- a/blog-post-workflow.js +++ b/blog-post-workflow.js @@ -291,6 +291,10 @@ Promise.allSettled(promiseArray).then((results) => { postsArray = postsArray.slice(0, TOTAL_POST_COUNT); if (postsArray.length > 0) { try { + if (!process.env.TEST_MODE) { + exec('git', ['config','pull.rebase', ' true']); + exec('git',['pull']); // Pulling the latest changes from upstream + } const readmeData = fs.readFileSync(README_FILE_PATH, 'utf8'); const template = core.getInput('template'); const randEmojiArr = getParameterisedTemplate(template, 'randomEmoji');