Skip to content

Commit db20360

Browse files
Check result of branch-deploy on every subsequent step.
1 parent 10752b4 commit db20360

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

.github/workflows/smoketest.yaml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,12 @@ permissions:
1414
statuses: read # Required for checking if all commit statuses are "success" in order to deploy the PR
1515

1616
jobs:
17-
permission-check:
17+
Linux:
1818
runs-on: ubuntu-latest
1919
environment: smoketest
2020
if: github.event.issue.pull_request # Make sure the comment is on a PR
21-
outputs:
22-
allowed: ${{ steps.branch-deploy.outputs.continue }}
2321
steps:
24-
- name: branch-deploy
22+
- name: Branch Deploy
2523
id: branch-deploy
2624
uses: github/branch-deploy@48285b12b35e47e2dde0c27d2abb33daa846d98b # v11.0.0
2725
with:
@@ -31,34 +29,33 @@ jobs:
3129
stable_branch: "main"
3230
update_branch: "disabled"
3331

34-
run-tests:
35-
runs-on: ubuntu-latest
36-
environment: smoketest
37-
needs: permission-check
38-
if: needs.permission-check.outputs.allowed == 'true'
39-
steps:
40-
- name: Setup Python
32+
- if steps.branch-deploy.outputs.continue == "true"
33+
name: Setup Python
4134
uses: actions/setup-python@v5
4235
with:
4336
python-version: '3.11'
4437

45-
- name: Checkout the repo
38+
- if steps.branch-deploy.outputs.continue == "true"
39+
name: Checkout the repo
4640
uses: actions/checkout@v5
4741

48-
- name: Checkout the PR
42+
- if steps.branch-deploy.outputs.continue == "true"
43+
name: Checkout the PR
4944
env:
5045
PR_NUMBER: ${{ github.event.issue.number }}
5146
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5247
run: |
5348
gh pr checkout $PR_NUMBER
5449
55-
- name: Setup Python venv
50+
- if steps.branch-deploy.outputs.continue == "true"
51+
name: Setup Python venv
5652
run: |
5753
python -m venv .venv
5854
source .venv/bin/activate
5955
python -m pip install hatch
6056
61-
- name: Run tests
57+
- if steps.branch-deploy.outputs.continue == "true"
58+
name: Run tests
6259
env:
6360
AI_API_TOKEN: ${{ secrets.AI_API_TOKEN }}
6461
GITHUB_AUTH_HEADER: "Bearer ${{ secrets.GITHUB_TOKEN }}"

0 commit comments

Comments
 (0)