Skip to content

Commit cbe0ea5

Browse files
authored
Security fix for benchmark.yml (#36402)
security Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
1 parent 88d1051 commit cbe0ea5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/benchmark.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
commit_id=$GITHUB_SHA
6565
fi
6666
commit_msg=$(git show -s --format=%s | cut -c1-70)
67-
python3 benchmark/benchmarks_entrypoint.py "${{ github.head_ref || github.ref_name }}" "$commit_id" "$commit_msg"
67+
python3 benchmark/benchmarks_entrypoint.py "$BRANCH_NAME" "$commit_id" "$commit_msg"
6868
env:
6969
HF_TOKEN: ${{ secrets.HF_HUB_READ_TOKEN }}
7070
# Enable this to see debug logs
@@ -73,3 +73,4 @@ jobs:
7373
PGHOST: ${{ secrets.TRANSFORMERS_BENCHMARKS_PGHOST }}
7474
PGUSER: transformers_benchmarks
7575
PGPASSWORD: ${{ secrets.TRANSFORMERS_BENCHMARKS_PGPASSWORD }}
76+
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}

0 commit comments

Comments
 (0)