Skip to content

Commit

Permalink
ci: use new env-replace action
Browse files Browse the repository at this point in the history
  • Loading branch information
microHoffman committed Nov 30, 2024
1 parent 474ebbd commit fb5532b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 22 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,9 @@ jobs:
if [ "$BRANCH_NAME" = "main" ]; then
echo "ENV_FILE=.env.app.production" >> $GITHUB_ENV
echo "BUILD_COMMAND=bun run build-prod" >> $GITHUB_ENV
echo "ENABLED_CHAIN_IDS=1" >> $GITHUB_ENV
echo "PREFERRED_CHAIN_ID=1" >> $GITHUB_ENV
else
echo "ENV_FILE=.env.app.development" >> $GITHUB_ENV
echo "BUILD_COMMAND=bun run build-dev" >> $GITHUB_ENV
echo "ENABLED_CHAIN_IDS=1,11155111" >> $GITHUB_ENV
echo "PREFERRED_CHAIN_ID=11155111" >> $GITHUB_ENV
fi
- name: Checkout
Expand All @@ -51,7 +47,7 @@ jobs:
run: bun install --frozen-lockfile

- name: Fill env values with secrets
uses: Langsdorf/env-replace@v1.0.7
uses: microHoffman/env-replace@master
with:
file: "env/${{ env.ENV_FILE }}"
replace-all: |
Expand All @@ -60,9 +56,6 @@ jobs:
NEXT_PUBLIC_SEPOLIA_RPC_URL=${{ secrets.NEXT_PUBLIC_SEPOLIA_RPC_URL }}
NEXT_PUBLIC_WEB3_STORAGE_KEY=${{ secrets.NEXT_PUBLIC_WEB3_STORAGE_KEY }}
NEXT_PUBLIC_ETHERSCAN_API_KEY=${{ secrets.NEXT_PUBLIC_ETHERSCAN_API_KEY }}
NEXT_PUBLIC_IPFS_ENDPOINTS=https://ipfs.io/ipfs,https://api-staging.pwn.xyz/ipfs,https://gateway.pinata.cloud/ipfs,https://dweb.link/ipfs,https://4everland.io/ipfs
NEXT_PUBLIC_PREFERRED_CHAIN_ID=${{ env.PREFERRED_CHAIN_ID }}
NEXT_PUBLIC_ENABLED_CHAIN_IDS=${{ env.ENABLED_CHAIN_IDS }}
upsert: true

- name: Build
Expand Down
10 changes: 3 additions & 7 deletions env/.env.app.development
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
# TODO assign here values after fixin the bug with Langsdorf/env-replace@v1.0.7
# where if using replace-all the values which are not specified in the replace-all
# or if they have same values are missing from the result...

# Chains
NEXT_PUBLIC_ENABLED_CHAIN_IDS=
NEXT_PUBLIC_PREFERRED_CHAIN_ID=
NEXT_PUBLIC_ENABLED_CHAIN_IDS=1,11155111
NEXT_PUBLIC_PREFERRED_CHAIN_ID=11155111

# IPFS
NEXT_PUBLIC_IPFS_ENDPOINTS=
NEXT_PUBLIC_IPFS_ENDPOINTS=https://ipfs.io/ipfs,https://api-staging.pwn.xyz/ipfs,https://gateway.pinata.cloud/ipfs,https://dweb.link/ipfs,https://4everland.io/ipfs

# Secrets
NEXT_PUBLIC_ETHEREUM_RPC_URL=
Expand Down
10 changes: 3 additions & 7 deletions env/.env.app.production
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
# TODO assign here values after fixin the bug with Langsdorf/env-replace@v1.0.7
# where if using replace-all the values which are not specified in the replace-all
# or if they have same values are missing from the result...

# Chains
NEXT_PUBLIC_ENABLED_CHAIN_IDS=
NEXT_PUBLIC_PREFERRED_CHAIN_ID=
NEXT_PUBLIC_ENABLED_CHAIN_IDS=1
NEXT_PUBLIC_PREFERRED_CHAIN_ID=1

# IPFS
NEXT_PUBLIC_IPFS_ENDPOINTS=
NEXT_PUBLIC_IPFS_ENDPOINTS=https://ipfs.io/ipfs,https://api-staging.pwn.xyz/ipfs,https://gateway.pinata.cloud/ipfs,https://dweb.link/ipfs,https://4everland.io/ipfs

# Secrets
NEXT_PUBLIC_ETHEREUM_RPC_URL=
Expand Down

0 comments on commit fb5532b

Please sign in to comment.