55 secrets :
66 CHIPFLOW_API_KEY :
77 required : true
8+ inputs :
9+ CHIPFLOW_API_ORIGIN :
10+ required : true
11+ type : string
12+ CHIPFLOW_BACKEND_VERSION :
13+ required : true
14+ type : string
15+ ENVIRONMENT :
16+ required : true
17+ type : string
18+
819
920jobs :
1021 test-submit :
1122 runs-on : ubuntu-latest
23+ environment : ${{ vars.ENVIRONMENT }}
1224 strategy :
1325 matrix :
1426 dry : [true, false]
1830 env :
1931 DRY : ${{ matrix.dry && '--dry-run' || '' }}
2032 is_dry : ${{ matrix.dry && '(dry run)' || '' }}
21- our_path : " ${{ github.workspace}}/${{ github.repo }} "
33+ our_path : ${{ github.workspace}}
2234 test_repo_path : " ${{ github.workspace }}/${{ matrix.repo.name }}"
2335
2436 name : ${{ matrix.dry && 'Test Submit - Dry run' || 'Test submit' }}
@@ -39,20 +51,23 @@ jobs:
3951 id : check-head-ref
4052 working-directory : ${{ env.test_repo_path }}
4153 if : github.event_name == 'pull_request'
54+ env :
55+ HEAD_REF : ${{ github.head_ref }}
56+ BASE_REF : ${{ github.base_ref }}
4257 run : |
4358 git remote update
44- if git checkout ${{ github.head_ref }} ; then
45- echo "Using branch ${{github.head_ref}} "
59+ if git checkout $HEAD_REF ; then
60+ echo "Using branch $HEAD_REF "
4661 echo "found-branch=1\n" >> $GITHUB_OUTPUT
4762 else
48- echo "${{github.head_ref}} not found, checking base ${{github.base_ref}} "
63+ echo "$HEAD_REF not found, checking base $BASE_REF "
4964 echo "found-branch=0\n" >> $GITHUB_OUTPUT
5065 fi
5166
5267 - name : Check for branch ${{ github.base_ref }}
5368 id : check-base-ref
5469 working-directory : ${{ env.test_repo_path }}x
55- if : github.event_name == 'pull_request' && steps.check-head-ref == 0
70+ if : github.event_name == 'pull_request' && steps.check-head-ref.outputs.found-branch == '0'
5671 run : |
5772 git remote update
5873 if git checkout ${{ github.base_ref }}; then
92107 pdm run chipflow silicon submit --wait $DRY | cat
93108 env :
94109 CHIPFLOW_API_KEY : ${{ secrets.CHIPFLOW_API_KEY}}
110+ CHIPFLOW_API_ORIGIN : ${{ inputs.CHIPFLOW_API_ORIGIN }}
111+ CHIPFLOW_BACKEND_VERSION : ${{ inputs.CHIPFLOW_BACKEND_VERSION }}
0 commit comments