Skip to content

Commit 36f8192

Browse files
authored
ci: sunnypilot UI GH Action fix ensure push to master-ui artifact (commaai#453)
Fixes the GitHub action that was failing when the pipeline was running as a result of a push to master-new because it was not properly recognized as "master"
1 parent 4b66cd0 commit 36f8192

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.github/workflows/selfdrive_tests.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ on:
1515
type: string
1616

1717
concurrency:
18-
group: selfdrive-tests-ci-run-${{ inputs.run_number }}-${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.run_id || github.head_ref || github.ref }}-${{ github.workflow }}-${{ github.event_name }}
18+
group: selfdrive-tests-ci-run-${{ inputs.run_number }}-${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/master-new') && github.run_id || github.head_ref || github.ref }}-${{ github.workflow }}-${{ github.event_name }}
1919
cancel-in-progress: true
2020

2121
env:
22+
REPORT_NAME: report-${{ inputs.run_number || '1' }}-${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/master-new') && 'master' || github.event.number }}
2223
PYTHONWARNINGS: error
2324
BASE_IMAGE: openpilot-base
2425
AZURE_TOKEN: ${{ secrets.AZURE_COMMADATACI_OPENPILOTCI_TOKEN }}
@@ -396,5 +397,5 @@ jobs:
396397
- name: Upload Test Report
397398
uses: actions/upload-artifact@v4
398399
with:
399-
name: report-${{ inputs.run_number || '1' }}-${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && 'master' || github.event.number }}
400+
name: ${{ env.REPORT_NAME }}
400401
path: selfdrive/ui/tests/test_ui/report_1/screenshots

.github/workflows/ui_preview.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ on:
1515

1616
env:
1717
UI_JOB_NAME: "Create UI Report"
18-
REPORT_NAME: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && 'master' || github.event.number }}
19-
SHA: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.sha || github.event.pull_request.head.sha }}
18+
REPORT_NAME: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/master-new') && 'master' || github.event.number }}
19+
SHA: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/master-new') && github.sha || github.event.pull_request.head.sha }}
2020
BRANCH_NAME: "openpilot/pr-${{ github.event.number }}"
2121

2222
jobs:

0 commit comments

Comments
 (0)