File tree Expand file tree Collapse file tree
.github/actions/tests/test-controller Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ inputs:
1111 test_type :
1212 description : ' Type of test, e.g. api or ui'
1313 required : true
14- default_branch :
14+ fallback_ref :
1515 description : ' Branch to fall back to when base_ref has no config in the API'
1616 required : false
1717 default : ' master'
3737 REPO_NAME : ${{ github.event.repository.name }}
3838 TEST_TYPE : ${{ inputs.test_type }}
3939 TRIGGER : ${{ github.event_name }}
40- DEFAULT_BRANCH : ${{ inputs.default_branch }}
40+ FALLBACK_REF : ${{ inputs.fallback_ref }}
4141 run : |
4242 set -eo pipefail
4343 BASE_URL="http://tui.internal.dev.tyk.technology/v2/$VARIATION/$REPO_NAME"
4848 "$BASE_URL/$BASE_REF/$ENDPOINT")
4949
5050 if [ "$HTTP_CODE" = "404" ]; then
51- echo "::warning::No test config for branch '$BASE_REF', falling back to '$DEFAULT_BRANCH '"
51+ echo "::warning::No test config for branch '$BASE_REF', falling back to '$FALLBACK_REF '"
5252 curl -s --retry 2 --retry-delay 10 --fail-with-body \
53- "$BASE_URL/$DEFAULT_BRANCH /$ENDPOINT" | tee -a "$GITHUB_OUTPUT"
53+ "$BASE_URL/$FALLBACK_REF /$ENDPOINT" | tee -a "$GITHUB_OUTPUT"
5454 elif [ "$HTTP_CODE" != "200" ]; then
5555 echo "API returned HTTP $HTTP_CODE for branch '$BASE_REF'" >&2
5656 cat /tmp/tui_response.txt >&2
You can’t perform that action at this time.
0 commit comments