Skip to content

Commit

Permalink
chore: only run PP network steps if gh secrets for sp1 key available
Browse files Browse the repository at this point in the history
Signed-off-by: Ji Hwan <jkim@polygon.technology>
  • Loading branch information
jhkimqd committed Dec 3, 2024
1 parent d76c7f9 commit 8580cbc
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ jobs:
- name: Install Kurtosis CDK tools
uses: ./.github/actions/setup-kurtosis-cdk

# Step to handle when the SP1_PRIVATE_KEY secret is available
# Step to handle when the SP1_PRIVATE_KEY secret is available.
- name: Replace Agglayer SP1 Prover Key with Github Secrets
run: |
sed -i "s/agglayer_prover_sp1_key: \"\"/agglayer_prover_sp1_key: \"${{ secrets.SP1_PRIVATE_KEY }}\"/" ./.github/tests/agglayer-sp1-key.yml
Expand All @@ -407,7 +407,7 @@ jobs:
env :
agglayer_prover_sp1_key: ${{ secrets.SP1_PRIVATE_KEY }}

# Step to handle when the SP1_PRIVATE_KEY secret is not available
# Step to handle when the SP1_PRIVATE_KEY secret is not available.
- name: Handle missing SP1_PRIVATE_KEY secret
if: ${{ !env.agglayer_prover_sp1_key || env.agglayer_prover_sp1_key == '' }}
run: |
Expand All @@ -421,8 +421,13 @@ jobs:
- name: Attach a second FEP CDK L2 chain (cdk-erigon sequencer + cdk FEP stack)
run: kurtosis run --enclave=${{ env.ENCLAVE_NAME }} --args-file=./.github/tests/attach-second-cdk.yml .

# Only run this step if the SP1_PRIVATE_KEY secrets is available.
- name: Attach a third PP CDK L2 chain (cdk-erigon sequencer + cdk PP stack)
run: kurtosis run --enclave=${{ env.ENCLAVE_NAME }} --args-file=./.github/tests/attach-third-cdk.yml .
if: ${{ !env.agglayer_prover_sp1_key || env.agglayer_prover_sp1_key == '' }}
run: |
kurtosis run --enclave=${{ env.ENCLAVE_NAME }} --args-file=./.github/tests/attach-third-cdk.yml .
env:
agglayer_prover_sp1_key: ${{ secrets.SP1_PRIVATE_KEY }}

- name: Restart the Erigon RPC of the PP network
run: |
Expand Down

0 comments on commit 8580cbc

Please sign in to comment.