-
Notifications
You must be signed in to change notification settings - Fork 6
Check result of branch-deploy on every subsequent step #112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -14,14 +14,12 @@ | |||||||||
| statuses: read # Required for checking if all commit statuses are "success" in order to deploy the PR | ||||||||||
|
|
||||||||||
| jobs: | ||||||||||
| permission-check: | ||||||||||
| Linux: | ||||||||||
| runs-on: ubuntu-latest | ||||||||||
| environment: smoketest | ||||||||||
| if: github.event.issue.pull_request # Make sure the comment is on a PR | ||||||||||
| outputs: | ||||||||||
| allowed: ${{ steps.branch-deploy.outputs.continue }} | ||||||||||
| steps: | ||||||||||
| - name: branch-deploy | ||||||||||
| - name: Branch Deploy | ||||||||||
| id: branch-deploy | ||||||||||
| uses: github/branch-deploy@48285b12b35e47e2dde0c27d2abb33daa846d98b # v11.0.0 | ||||||||||
| with: | ||||||||||
|
|
@@ -31,54 +29,47 @@ | |||||||||
| stable_branch: "main" | ||||||||||
| update_branch: "disabled" | ||||||||||
|
|
||||||||||
| run-tests: | ||||||||||
| runs-on: ubuntu-latest | ||||||||||
| environment: smoketest | ||||||||||
| needs: permission-check | ||||||||||
| if: needs.permission-check.outputs.allowed == 'true' | ||||||||||
| steps: | ||||||||||
| - name: Setup Python | ||||||||||
| - if: steps.branch-deploy.outputs.continue == "true" | ||||||||||
| name: Setup Python | ||||||||||
|
Comment on lines
+32
to
+33
|
||||||||||
| uses: actions/setup-python@v5 | ||||||||||
| with: | ||||||||||
| python-version: '3.11' | ||||||||||
|
|
||||||||||
| - name: Checkout the repo | ||||||||||
| uses: actions/checkout@v5 | ||||||||||
|
|
||||||||||
| - name: Checkout the PR | ||||||||||
| env: | ||||||||||
| PR_NUMBER: ${{ github.event.issue.number }} | ||||||||||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||||||
| run: | | ||||||||||
| gh pr checkout $PR_NUMBER | ||||||||||
| - if: steps.branch-deploy.outputs.continue == "true" | ||||||||||
| name: Checkout the repo | ||||||||||
|
Comment on lines
+38
to
+39
|
||||||||||
| uses: actions/checkout@v6 | ||||||||||
| with: | ||||||||||
| ref: ${{ steps.branch-deploy.outputs.sha }} | ||||||||||
|
|
||||||||||
| - name: Setup Python venv | ||||||||||
| - if: steps.branch-deploy.outputs.continue == "true" | ||||||||||
| name: Setup Python venv | ||||||||||
|
Comment on lines
+44
to
+45
|
||||||||||
| - if: steps.branch-deploy.outputs.continue == "true" | |
| name: Setup Python venv | |
| - name: Setup Python venv | |
| if: steps.branch-deploy.outputs.continue == "true" |
Check failure
Code scanning / CodeQL
Untrusted Checkout TOCTOU Critical
issue_comment
Copilot
AI
Dec 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The if conditional should be placed after the name field. Consider:
- name: Run tests
if: steps.branch-deploy.outputs.continue == 'true'
env:
AI_API_TOKEN: ${{ secrets.AI_API_TOKEN }}
GITHUB_AUTH_HEADER: "Bearer ${{ secrets.GITHUB_TOKEN }}"
run: |
...See below for a potential fix:
- name: Setup Python
if: steps.branch-deploy.outputs.continue == "true"
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Checkout the repo
if: steps.branch-deploy.outputs.continue == "true"
uses: actions/checkout@v6
with:
ref: ${{ steps.branch-deploy.outputs.sha }}
- name: Setup Python venv
if: steps.branch-deploy.outputs.continue == "true"
run: |
python -m venv .venv
source .venv/bin/activate
python -m pip install hatch
- name: Run tests
if: steps.branch-deploy.outputs.continue == "true"
Uh oh!
There was an error while loading. Please reload this page.