Skip to content

Commit 89a5333

Browse files
authored
Allow repo variables to target forks on smoke tests (#13423)
1 parent 42c9346 commit 89a5333

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/smoke.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ concurrency:
1414

1515
env:
1616
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17-
SMOKE_TEST_BRANCH: main
17+
SMOKE_TEST_BRANCH: ${{ vars.SMOKE_TEST_BRANCH || 'main' }}
1818
jobs:
1919
discover:
2020
runs-on: ubuntu-latest
@@ -44,7 +44,7 @@ jobs:
4444
cat filtered.json
4545
4646
# Curl the smoke-test tests directory to get a list of tests to run
47-
URL=https://api.github.com/repos/dependabot/smoke-tests/contents/tests?ref=${{ env.SMOKE_TEST_BRANCH }}
47+
URL=https://api.github.com/repos/${{ vars.SMOKE_TEST_REPO || 'dependabot/smoke-tests' }}/contents/tests?ref=${{ env.SMOKE_TEST_BRANCH }}
4848
curl $URL > tests.json
4949
5050
# Select the names that match smoke-$test*.yaml, where $test is the .text value from filtered.json
@@ -84,7 +84,7 @@ jobs:
8484
- name: Download test
8585
if: steps.cache-smoke-test.outputs.cache-hit != 'true'
8686
run: |
87-
URL=https://api.github.com/repos/dependabot/smoke-tests/contents/tests/${{ matrix.suite.name }}?ref=${{ env.SMOKE_TEST_BRANCH }}
87+
URL=https://api.github.com/repos/${{ vars.SMOKE_TEST_REPO || 'dependabot/smoke-tests' }}/contents/tests/${{ matrix.suite.name }}?ref=${{ env.SMOKE_TEST_BRANCH }}
8888
curl $(gh api $URL --jq .download_url) -o smoke.yaml
8989
9090
- name: Cache Smoke Test

0 commit comments

Comments
 (0)