Skip to content

Commit

Permalink
fix: rename puppeteer env flag to PUPPETEER_SKIP_DOWNLOAD (#174)
Browse files Browse the repository at this point in the history
  • Loading branch information
sidvishnoi authored Apr 10, 2024
1 parent e6ebe4e commit f311679
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
5 changes: 2 additions & 3 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ export const ACTION_DIR = path.join(__dirname, "..");

export const PUPPETEER_ENV = (() => {
const skipChromeDownload =
!!process.env.PUPPETEER_SKIP_CHROMIUM_DOWNLOAD ||
!!process.env.GITHUB_ACTIONS;
!!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",
};
Expand Down

0 comments on commit f311679

Please sign in to comment.