CI: Fix GIT_REF formatting in safety mutation workflow (#2070)

Replace string interpolation with format function for consistency and better readability. This ensures proper handling of default branch references in the workflow.
This commit is contained in:
Jason Wen
2025-04-01 14:47:24 -04:00
committed by GitHub
parent cc6fca86e3
commit 7621a8fd9c

View File

@@ -94,7 +94,7 @@ jobs:
runs-on: ${{ github.repository == 'commaai/opendbc' && 'namespace-profile-amd64-8x16' || 'ubuntu-latest' }}
timeout-minutes: 20
env:
GIT_REF: ${{ github.event_name == 'push' && github.ref == 'refs/heads/${{ github.event.repository.default_branch }}' && github.event.before || 'origin/${{ github.event.repository.default_branch }}' }}
GIT_REF: ${{ github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && github.event.before || format('origin/{0}', github.event.repository.default_branch) }}
steps:
- uses: actions/checkout@v4
with: