From 399bab691a765e43a5dd2167dd147c5d501abb84 Mon Sep 17 00:00:00 2001 From: Ethan Date: Sun, 8 Sep 2024 17:10:44 +0800 Subject: [PATCH] chores: test ci script --- .github/workflows/check-bsc-hardfork-bytecode.yml | 4 +++- scripts/check-bsc-hardfork-bytecode.ts | 9 ++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/check-bsc-hardfork-bytecode.yml b/.github/workflows/check-bsc-hardfork-bytecode.yml index b7f2366d..a1654e9a 100644 --- a/.github/workflows/check-bsc-hardfork-bytecode.yml +++ b/.github/workflows/check-bsc-hardfork-bytecode.yml @@ -54,8 +54,10 @@ jobs: const info = JSON.parse(prBody.substring(p1 + 3, p2)) console.log('info', info, info.hardfork, info.bsc) core.setOutput('hardfork', info.hardfork) + core.setOutput('bsc', info.bsc) - name: Compare genesis with hardfork bytecode files from BSC repo run: | - echo ${{ steps.extract_pr_description.outputs.hardfork }} + export HARDFORK=${{ steps.extract_pr_description.outputs.hardfork }} + export BSC_URL=${{ steps.extract_pr_description.outputs.bsc }} ts-node scripts/check-bsc-hardfork-bytecode.ts diff --git a/scripts/check-bsc-hardfork-bytecode.ts b/scripts/check-bsc-hardfork-bytecode.ts index 31bdf7ae..f1a40cc3 100644 --- a/scripts/check-bsc-hardfork-bytecode.ts +++ b/scripts/check-bsc-hardfork-bytecode.ts @@ -151,13 +151,8 @@ const clear0x = (str: string) => { }; const main = async () => { - const pr = process.env.PR_BODY - log('PR_BODY:', pr) - const info = process.env.info - log('info:', info) - const p1 = pr.indexOf('>CI') - const p2 = pr.indexOf('>CI', p1 + 1) - log(p1, p2, pr.substring(p1 + 3, p2)) + log('process.env.HARDFORK', process.env.HARDFORK) + log('process.env.BSC_URL', process.env.BSC_URL) if (!bscRepoDir) { throw new Error('BSC_REPO_DIR is required in .env')