Skip to content

Commit

Permalink
Allow skipping auth in env setup
Browse files Browse the repository at this point in the history
  • Loading branch information
dremin committed Oct 25, 2023
1 parent 9a196ab commit 334bf58
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,10 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: '16'
- name: set github environment variables
env:
SECRETS_CONTEXT: ${{ toJson(secrets) }}
VARS_CONTEXT: ${{ toJson(vars) }}
run: scripts/github-set-env.sh
- name: Install packages
run: |
npm install
npm install --ignore-scripts
npm run postinstall -- --skip-auth
- name: Run eslint
run: npm run lint:report
continue-on-error: true
Expand Down
7 changes: 5 additions & 2 deletions scripts/setup-environment.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import * as constants from "./common/constants.mjs";
// example usage of all possible options:
// node scripts/setup-environment.mjs --skip-install --env=dev --packages=serverless-functions,serverless-schedule-manager

let skipAuthStep = false;
let skipInstallStep = false;
let overwrite = false;
let uninstall = false;
Expand All @@ -28,6 +29,8 @@ for (let i = 2; i < process.argv.length; i++) {
overwrite = true;
} else if (process.argv[i].startsWith('--uninstall')) {
uninstall = true;
} else if (process.argv[i].startsWith('--skip-auth')) {
skipAuthStep = true;
}
}

Expand All @@ -45,9 +48,9 @@ const execute = async () => {
console.log("");
}

const account = await getTwilioAccount();
const account = skipAuthStep ? {} : await getTwilioAccount();

if (!account) {
if (!account && !skipAuthStep) {
// No account provided
outputEnd();
return;
Expand Down

0 comments on commit 334bf58

Please sign in to comment.