Skip to content

Commit

Permalink
Fix CI for external PRs
Browse files Browse the repository at this point in the history
Secrets aren't available in PRs from forked repositories.
Google Maps keys aren't exactly private, but I don't really
want them committed on GitHub...
  • Loading branch information
sandydoo committed Aug 23, 2021
1 parent a1225a9 commit 46b41d7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/scripts/setup-ci.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

WHERE=https://ember-google-maps.s3.eu-west-1.amazonaws.com/46830d7e7843d054dc6ab36416baf9dd942126f9.txt.gpg

if [ -z $GOOGLE_MAPS_API_KEY ]
then
KEY=$(curl -s $WHERE | gpg --quiet --yes --batch --decrypt --passphrase="a hamster in the rye")
echo "GOOGLE_MAPS_API_KEY=$KEY" >> $GITHUB_ENV
fi
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ jobs:
with:
path: '**/node_modules'
key: ci-modules-${{ hashFiles('**/yarn.lock') }}
- name: Prepare
run: ./.github/scripts/setup-ci.sh
- name: Install dependencies
run: yarn install --frozen-lockfile --non-interactive
- name: Lint
Expand All @@ -57,6 +59,8 @@ jobs:
with:
path: '**/node_modules'
key: ci-modules-${{ hashFiles('**/yarn.lock') }}
- name: Prepare
run: ./.github/scripts/setup-ci.sh
- name: Install dependencies
run: yarn install --frozen-lockfile --non-interactive
- name: Test
Expand All @@ -75,6 +79,8 @@ jobs:
with:
path: '**/node_modules'
key: ci-modules-${{ hashFiles('**/yarn.lock') }}
- name: Prepare
run: ./.github/scripts/setup-ci.sh
- name: Install dependencies
run: yarn install --no-lockfile --non-interactive
- name: Test
Expand Down Expand Up @@ -114,6 +120,8 @@ jobs:
with:
path: '**/node_modules'
key: ci-modules-${{ hashFiles('**/yarn.lock') }}
- name: Prepare
run: ./.github/scripts/setup-ci.sh
- name: Install dependencies
run: yarn install --frozen-lockfile --non-interactive
- name: Test
Expand Down
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

# misc
/.env*
/public/46830d7e7843d054dc6ab36416baf9dd942126f9.*
/.pnp*
/.sass-cache
/.eslintcache
Expand Down

0 comments on commit 46b41d7

Please sign in to comment.