Skip to content

Commit 6fce3ec

Browse files
Merge pull request #130 from TykTechnologies/update-test-controller-fallback-ref
Update test-controller to use fallback_ref instead of default_branch
2 parents 1894903 + 1f9c2fd commit 6fce3ec

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

.github/actions/tests/test-controller/action.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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'
@@ -37,7 +37,7 @@ runs:
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"
@@ -48,9 +48,9 @@ runs:
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

0 commit comments

Comments
 (0)