From e157cd7cc1fec5f266ae55dbe3c077aa77226942 Mon Sep 17 00:00:00 2001 From: Sid Vishnoi <8426945+sidvishnoi@users.noreply.github.com> Date: Tue, 9 Apr 2024 17:38:34 +0530 Subject: [PATCH 1/2] fix: rename puppeteer env var flag to `PUPPETEER_SKIP_DOWNLOAD` --- .github/workflows/docs.yml | 2 +- .github/workflows/pr.yml | 2 +- action.yml | 2 +- src/constants.ts | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 2a61e3c..df938d8 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -8,7 +8,7 @@ on: workflow_dispatch: {} env: - PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 1 + PUPPETEER_SKIP_DOWNLOAD: 1 PUPPETEER_EXECUTABLE_PATH: /usr/bin/google-chrome jobs: diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index b4d3afb..5e6292d 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -11,7 +11,7 @@ on: - ".github/workflows/**" env: - PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 1 + PUPPETEER_SKIP_DOWNLOAD: 1 PUPPETEER_EXECUTABLE_PATH: /usr/bin/google-chrome jobs: diff --git a/action.yml b/action.yml index 8ced16d..d0e2367 100644 --- a/action.yml +++ b/action.yml @@ -72,7 +72,7 @@ runs: shell: bash env: FORCE_COLOR: "true" - PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: "1" + PUPPETEER_SKIP_DOWNLOAD: "1" - name: Prepare id: prepare run: | diff --git a/src/constants.ts b/src/constants.ts index ecabe7b..d79bac0 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -4,11 +4,11 @@ export const ACTION_DIR = path.join(__dirname, ".."); export const PUPPETEER_ENV = (() => { const skipChromeDownload = - !!process.env.PUPPETEER_SKIP_CHROMIUM_DOWNLOAD || + !!process.env.PUPPETEER_SKIP_DOWNLOAD || !!process.env.GITHUB_ACTIONS; if (!skipChromeDownload) return {}; return { - PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: "1", + PUPPETEER_SKIP_DOWNLOAD: "1", PUPPETEER_EXECUTABLE_PATH: process.env.PUPPETEER_EXECUTABLE_PATH || "/usr/bin/google-chrome", }; From c150e97c5a7c3701d2ac701dbaac426fb33fcec2 Mon Sep 17 00:00:00 2001 From: Sid Vishnoi <8426945+sidvishnoi@users.noreply.github.com> Date: Wed, 10 Apr 2024 14:59:49 +0530 Subject: [PATCH 2/2] prettier --- src/constants.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index d79bac0..252b522 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -4,8 +4,7 @@ export const ACTION_DIR = path.join(__dirname, ".."); export const PUPPETEER_ENV = (() => { const skipChromeDownload = - !!process.env.PUPPETEER_SKIP_DOWNLOAD || - !!process.env.GITHUB_ACTIONS; + !!process.env.PUPPETEER_SKIP_DOWNLOAD || !!process.env.GITHUB_ACTIONS; if (!skipChromeDownload) return {}; return { PUPPETEER_SKIP_DOWNLOAD: "1",