Skip to content

Commit 5241901

Browse files
Allow empty key or proper regex
1 parent eb5fbee commit 5241901

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.github/workflows/upgrade.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ jobs:
2626
cache: 'npm'
2727
- name: Install dependencies
2828
run: npm ci
29-
- run: | # TODO: Commit all file changed and create PR
29+
- run: |
3030
echo "Network: $NETWORK"
3131
echo "IS_LOCAL_FORK: $IS_LOCAL_FORK"
3232
npm run upgrade -- --network $NETWORK
3333
echo "Test" > test.txt
3434
env:
3535
NETWORK: ${{ inputs.network }}
3636
IS_LOCAL_FORK: ${{ inputs.network == 'hardhat'}}
37-
PROD_PRIVATE_KEY: ''
37+
PROD_PRIVATE_KEY: ${{ inputs.network == 'bellecour' && secrets.PROD_PRIVATE_KEY || '' }}
3838
- uses: stefanzweifel/git-auto-commit-action@v5

config/env.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ const envSchema = z.object({
2121
z.boolean().default(false),
2222
),
2323
MNEMONIC: z.string().optional(),
24-
PROD_PRIVATE_KEY: z.string().regex(privateKeyRegex, 'Invalid private key format').optional(),
24+
PROD_PRIVATE_KEY: z
25+
.string()
26+
.regex(privateKeyRegex, 'Invalid private key format')
27+
.optional()
28+
.or(z.literal('')),
2529
IEXEC_POCO_ADDRESS: z
2630
.string()
2731
.regex(addressRegex, 'Invalid Ethereum address if provided')

0 commit comments

Comments
 (0)