@@ -4,16 +4,24 @@ inputs:
44 type :
55 description : ' Type of EVM binary to build (key in .github/configs/evm.yaml)'
66 required : true
7+ repo_override :
8+ description : ' Override the repo from evm.yaml (e.g. ethereum/go-ethereum)'
9+ required : false
10+ default : ' '
11+ ref_override :
12+ description : ' Override the ref/branch/commit from evm.yaml'
13+ required : false
14+ default : ' '
715outputs :
816 impl :
917 description : " Implementation of EVM binary to build"
10- value : ${{ inputs.type }}
18+ value : ${{ steps.config-evm-reader.outputs.impl }}
1119 repo :
1220 description : " Repository to use to build the EVM binary"
13- value : ${{ steps.config-evm-reader .outputs.repo }}
21+ value : ${{ steps.resolved .outputs.repo }}
1422 ref :
1523 description : " Reference to branch, commit, or tag to use to build the EVM binary"
16- value : ${{ steps.config-evm-reader .outputs.ref }}
24+ value : ${{ steps.resolved .outputs.ref }}
1725 evm-bin :
1826 description : " Binary name of the evm tool to use"
1927 value : ${{ steps.config-evm-reader.outputs.evm-bin }}
@@ -29,35 +37,47 @@ runs:
2937 run : |
3038 awk "/^${{ inputs.type }}:/{flag=1; next} /^[[:alnum:]]/{flag=0} flag" ./.github/configs/evm.yaml \
3139 | sed 's/ //g' | sed 's/:/=/g' >> "$GITHUB_OUTPUT"
40+ - name : Apply repo/ref overrides
41+ id : resolved
42+ shell : bash
43+ env :
44+ DEFAULT_REPO : ${{ steps.config-evm-reader.outputs.repo }}
45+ DEFAULT_REF : ${{ steps.config-evm-reader.outputs.ref }}
46+ REPO_OVERRIDE : ${{ inputs.repo_override }}
47+ REF_OVERRIDE : ${{ inputs.ref_override }}
48+ run : |
49+ echo "repo=${REPO_OVERRIDE:-$DEFAULT_REPO}" >> "$GITHUB_OUTPUT"
50+ echo "ref=${REF_OVERRIDE:-$DEFAULT_REF}" >> "$GITHUB_OUTPUT"
3251 - name : Print Variables for the selected EVM type
3352 shell : bash
3453 run : |
35- echo "Implementation: ${{ inputs.type }}"
36- echo "Repository: ${{ steps.config-evm-reader.outputs.repo }}"
37- echo "Reference: ${{ steps.config-evm-reader.outputs.ref }}"
54+ echo "Type: ${{ inputs.type }}"
55+ echo "Implementation: ${{ steps.config-evm-reader.outputs.impl }}"
56+ echo "Repository: ${{ steps.resolved.outputs.repo }}"
57+ echo "Reference: ${{ steps.resolved.outputs.ref }}"
3858 echo "EVM Binary: ${{ steps.config-evm-reader.outputs.evm-bin }}"
3959 echo "X-Dist parameter: ${{ steps.config-evm-reader.outputs.x-dist }}"
4060 - name : Skip building for EELS
41- if : inputs.type == 'eels'
61+ if : steps.config-evm-reader.outputs.impl == 'eels'
4262 shell : bash
4363 run : echo "Skipping build for EELS"
4464 - name : Build the EVM using Geth action
45- if : inputs.type == 'geth'
65+ if : steps.config-evm-reader.outputs.impl == 'geth'
4666 uses : ./.github/actions/build-evm-client/geth
4767 with :
48- repo : ${{ steps.config-evm-reader .outputs.repo }}
49- ref : ${{ steps.config-evm-reader .outputs.ref }}
68+ repo : ${{ steps.resolved .outputs.repo }}
69+ ref : ${{ steps.resolved .outputs.ref }}
5070 - name : Build the EVM using EVMONE action
51- if : inputs.type == 'evmone'
71+ if : steps.config-evm-reader.outputs.impl == 'evmone'
5272 uses : ./.github/actions/build-evm-client/evmone
5373 with :
54- repo : ${{ steps.config-evm-reader .outputs.repo }}
55- ref : ${{ steps.config-evm-reader .outputs.ref }}
74+ repo : ${{ steps.resolved .outputs.repo }}
75+ ref : ${{ steps.resolved .outputs.ref }}
5676 # `targets` in evm.yaml must be an inline array to not interfere with `config-evm-reader`'s parsing
5777 targets : ${{ join(fromJSON(steps.config-evm-reader.outputs.targets), ' ') }}
5878 - name : Build the EVM using Besu action
59- if : inputs.type == 'besu'
79+ if : steps.config-evm-reader.outputs.impl == 'besu'
6080 uses : ./.github/actions/build-evm-client/besu
6181 with :
62- repo : ${{ steps.config-evm-reader .outputs.repo }}
63- ref : ${{ steps.config-evm-reader .outputs.ref }}
82+ repo : ${{ steps.resolved .outputs.repo }}
83+ ref : ${{ steps.resolved .outputs.ref }}
0 commit comments