Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[No QA] Pass required secrets to setupNode #25630

Merged
merged 1 commit into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/actions/composite/buildAndroidAPK/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@ inputs:
ARTIFACT_NAME:
description: The name of the workflow artifact where the APK should be uploaded
required: true
MAPBOX_SDK_DOWNLOAD_TOKEN:
description: Download token for the closed-source MapBox SDK.
required: true

runs:
using: composite
steps:
- uses: Expensify/App/.github/actions/composite/setupNode@main
with:
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ inputs.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- uses: ruby/setup-ruby@eae47962baca661befdfd24e4d6c34ade04858f7
with:
Expand Down
7 changes: 6 additions & 1 deletion .github/actions/composite/setupNode/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Set up Node
description: Set up Node

inputs:
MAPBOX_SDK_DOWNLOAD_TOKEN:
description: Download token for the closed-source MapBox SDK.
required: true

runs:
using: composite
steps:
Expand All @@ -25,7 +30,7 @@ runs:
key: ${{ runner.os }}-desktop-node-modules-${{ hashFiles('desktop/package-lock.json') }}

- name: Configure MapBox credentials to install closed-source SDK
run: ./scripts/setup-mapbox-sdk.sh ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}
run: ./scripts/setup-mapbox-sdk.sh ${{ inputs.MAPBOX_SDK_DOWNLOAD_TOKEN }}
shell: bash

- name: Install root project node packages
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/deployExpensifyHelp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,29 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8

- name: Setup NodeJS
uses: Expensify/App/.github/actions/composite/setupNode@main
with:
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- name: Setup Pages
uses: actions/configure-pages@f156874f8191504dae5b037505266ed5dda6c382

- name: Create docs routes file
run: ./.github/scripts/createDocsRoutes.sh

- name: Build with Jekyll
uses: actions/jekyll-build-pages@0143c158f4fa0c5dcd99499a5d00859d79f70b0e
with:
source: ./docs/
destination: ./docs/_site

- name: Upload artifact
uses: actions/upload-pages-artifact@64bcae551a7b18bcb9a09042ddf1960979799187
with:
path: ./docs/_site


# Deployment job
deploy:
environment:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/e2ePerformanceTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
uses: Expensify/App/.github/actions/composite/buildAndroidAPK@main
with:
ARTIFACT_NAME: baseline-apk-${{ steps.getMostRecentRelease.outputs.VERSION }}
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

buildDelta:
runs-on: ubuntu-latest-xl
Expand Down Expand Up @@ -116,6 +117,7 @@ jobs:
uses: Expensify/App/.github/actions/composite/buildAndroidAPK@main
with:
ARTIFACT_NAME: delta-apk-${{ steps.getDeltaRef.outputs.DELTA_REF }}
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

runTestsInAWS:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8

- uses: Expensify/App/.github/actions/composite/setupNode@main
with:
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- name: Lint JavaScript with ESLint
run: npm run lint
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/platformDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ jobs:
- uses: actions/checkout@v3

- uses: Expensify/App/.github/actions/composite/setupNode@main
with:
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- uses: ruby/setup-ruby@eae47962baca661befdfd24e4d6c34ade04858f7
with:
Expand Down Expand Up @@ -108,6 +110,8 @@ jobs:
- uses: actions/checkout@v3

- uses: Expensify/App/.github/actions/composite/setupNode@main
with:
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- name: Decrypt Developer ID Certificate
run: cd desktop && gpg --quiet --batch --yes --decrypt --passphrase="$DEVELOPER_ID_SECRET_PASSPHRASE" --output developer_id.p12 developer_id.p12.gpg
Expand Down Expand Up @@ -145,6 +149,8 @@ jobs:
- uses: actions/checkout@v3

- uses: Expensify/App/.github/actions/composite/setupNode@main
with:
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- uses: ruby/setup-ruby@eae47962baca661befdfd24e4d6c34ade04858f7
with:
Expand Down Expand Up @@ -231,6 +237,8 @@ jobs:
- uses: actions/checkout@v3

- uses: Expensify/App/.github/actions/composite/setupNode@main
with:
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- name: Setup Cloudflare CLI
run: pip3 install cloudflare
Expand Down Expand Up @@ -358,6 +366,8 @@ jobs:
- uses: actions/checkout@v3

- uses: Expensify/App/.github/actions/composite/setupNode@main
with:
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- name: Set version
run: echo "VERSION=$(npm run print-version --silent)" >> "$GITHUB_ENV"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/reassurePerformanceTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:

- name: Setup NodeJS
uses: Expensify/App/.github/actions/composite/setupNode@main
with:
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- name: Run performance testing script
shell: bash
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
- uses: actions/checkout@v3

- uses: Expensify/App/.github/actions/composite/setupNode@main
with:
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- name: Get number of CPU cores
id: cpu-cores
Expand All @@ -42,7 +44,11 @@ jobs:
name: Storybook tests
steps:
- uses: actions/checkout@v3

- uses: Expensify/App/.github/actions/composite/setupNode@main
with:
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- name: Storybook run
run: npm run storybook -- --smoke-test --ci

Expand All @@ -54,6 +60,8 @@ jobs:
- uses: actions/checkout@v3

- uses: Expensify/App/.github/actions/composite/setupNode@main
with:
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- name: Test CI git logic
run: tests/unit/CIGitLogicTest.sh
8 changes: 8 additions & 0 deletions .github/workflows/testBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ jobs:
echo "PULL_REQUEST_NUMBER=$PULL_REQUEST_NUMBER" >> .env.adhoc

- uses: Expensify/App/.github/actions/composite/setupNode@main
with:
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- uses: ruby/setup-ruby@eae47962baca661befdfd24e4d6c34ade04858f7
with:
Expand Down Expand Up @@ -139,6 +141,8 @@ jobs:
echo "PULL_REQUEST_NUMBER=$PULL_REQUEST_NUMBER" >> .env.adhoc

- uses: Expensify/App/.github/actions/composite/setupNode@main
with:
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- name: Setup Xcode
run: sudo xcode-select -switch /Applications/Xcode_14.2.app
Expand Down Expand Up @@ -203,6 +207,8 @@ jobs:
echo "PULL_REQUEST_NUMBER=$PULL_REQUEST_NUMBER" >> .env.adhoc

- uses: Expensify/App/.github/actions/composite/setupNode@main
with:
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- name: Decrypt Developer ID Certificate
run: cd desktop && gpg --quiet --batch --yes --decrypt --passphrase="$DEVELOPER_ID_SECRET_PASSPHRASE" --output developer_id.p12 developer_id.p12.gpg
Expand Down Expand Up @@ -244,6 +250,8 @@ jobs:
echo "PULL_REQUEST_NUMBER=$PULL_REQUEST_NUMBER" >> .env.adhoc

- uses: Expensify/App/.github/actions/composite/setupNode@main
with:
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- name: Configure AWS Credentials
uses: Expensify/App/.github/actions/composite/configureAwsCredentials@main
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/typecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:
- uses: actions/checkout@v3

- uses: Expensify/App/.github/actions/composite/setupNode@main
with:
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- name: Type check with TypeScript
run: npm run typecheck
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/validateDocsRoutes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:
- uses: actions/checkout@v3

- uses: Expensify/App/.github/actions/composite/setupNode@main
with:
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

# Verify that no new hubs were created without adding their metadata to _routes.yml
- name: Validate Docs Routes File
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/validateGithubActions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
- uses: actions/checkout@v3

- uses: Expensify/App/.github/actions/composite/setupNode@main
with:
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

# Rebuild all the actions on this branch and check for a diff. Fail if there is one,
# because that would be a sign that the PR author did not rebuild the Github Actions
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/verifyPodfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,9 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3

- uses: Expensify/App/.github/actions/composite/setupNode@main
with:
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- run: ./.github/scripts/verifyPodfile.sh