Skip to content

Commit

Permalink
chore: gh secrets and test conditional
Browse files Browse the repository at this point in the history
Signed-off-by: Ji Hwan <[email protected]>
  • Loading branch information
jhkimqd committed Dec 3, 2024
1 parent e60a7f6 commit d76c7f9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -397,14 +397,23 @@ jobs:
- name: Install Kurtosis CDK tools
uses: ./.github/actions/setup-kurtosis-cdk

# 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
# This step will only execute if the necessary secrets are available, preventing failures
# on pull requests from forked repositories.
if: ${{ env.agglayer_prover_sp1_key }}
if: ${{ env.agglayer_prover_sp1_key && env.agglayer_prover_sp1_key != '' }}
env :
agglayer_prover_sp1_key: ${{ secrets.SP1_PRIVATE_KEY }}

# 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: |
sed -i '/agglayer_prover_sp1_key:/d' ./.github/tests/agglayer-sp1-key.yml
env:
agglayer_prover_sp1_key: ${{ secrets.SP1_PRIVATE_KEY }}

- name: Deploy L1 chain and a first CDK L2 chain (cdk-erigon sequencer + cdk stack)
run: kurtosis run --enclave=${{ env.ENCLAVE_NAME }} --args-file=./.github/tests/agglayer-sp1-key.yml .
Expand Down

0 comments on commit d76c7f9

Please sign in to comment.