Skip to content

Commit b876d78

Browse files
Separate re-execution job params for PR from schedule (#4151)
1 parent 752e12f commit b876d78

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

.github/workflows/c-chain-reexecution-benchmark.yml

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ on:
3030

3131
jobs:
3232
c-chain-reexecution:
33+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'ava-labs/avalanchego'
3334
permissions:
3435
id-token: write
3536
contents: write
@@ -43,12 +44,28 @@ jobs:
4344
- name: Set task env via GITHUB_ENV
4445
id: set-params
4546
run: |
46-
{
47-
echo "START_BLOCK=${{ github.event.inputs.start-block || 101 }}"
48-
echo "END_BLOCK=${{ github.event.inputs.end-block || 250000 }}"
49-
echo "SOURCE_BLOCK_DIR=${{ github.event.inputs.source-block-dir || 's3://avalanchego-bootstrap-testing/cchain-mainnet-blocks-1m-ldb.zip' }}"
50-
echo "CURRENT_STATE_DIR=${{ github.event.inputs.current-state-dir || 's3://avalanchego-bootstrap-testing/cchain-current-state-hashdb-full-100.zip' }}"
51-
} >> "$GITHUB_ENV"
47+
if [[ "${{ github.event_name }}" == "schedule" ]]; then
48+
{
49+
echo "START_BLOCK=101"
50+
echo "END_BLOCK=250000"
51+
echo "SOURCE_BLOCK_DIR=s3://avalanchego-bootstrap-testing/cchain-mainnet-blocks-1m-ldb.zip"
52+
echo "CURRENT_STATE_DIR=s3://avalanchego-bootstrap-testing/cchain-current-state-hashdb-full-100.zip"
53+
} >> "$GITHUB_ENV"
54+
elif [[ "${{ github.event_name }}" == "pull_request" ]]; then
55+
{
56+
echo "START_BLOCK=101"
57+
echo "END_BLOCK=100000"
58+
echo "SOURCE_BLOCK_DIR=s3://avalanchego-bootstrap-testing/cchain-mainnet-blocks-1m-ldb.zip"
59+
echo "CURRENT_STATE_DIR=s3://avalanchego-bootstrap-testing/cchain-current-state-hashdb-full-100.zip"
60+
} >> "$GITHUB_ENV"
61+
else
62+
{
63+
echo "START_BLOCK=${{ github.event.inputs.start-block }}"
64+
echo "END_BLOCK=${{ github.event.inputs.end-block }}"
65+
echo "SOURCE_BLOCK_DIR=${{ github.event.inputs.source-block-dir }}"
66+
echo "CURRENT_STATE_DIR=${{ github.event.inputs.current-state-dir }}"
67+
} >> "$GITHUB_ENV"
68+
fi
5269
- uses: actions/checkout@v4
5370
- uses: ./.github/actions/setup-go-for-project
5471
- name: Run C-Chain Re-Execution

0 commit comments

Comments
 (0)