mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-05 06:01:20 +00:00
fix(ci): properly escape PR title (#3318)
Within double quoted strings, bash tries to evaluate everything within backticks as a command. The GitHub security guide recommends to use an intermediary environment variable instead: https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable See https://github.com/libp2p/rust-libp2p/actions/runs/3889880383/jobs/6638520274#step:3:11.
This commit is contained in:
parent
735945db30
commit
29a77164f1
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
@ -298,11 +298,12 @@ jobs:
|
|||||||
require_scope: false
|
require_scope: false
|
||||||
|
|
||||||
- name: Check PR title length
|
- name: Check PR title length
|
||||||
|
env:
|
||||||
|
TITLE: ${{ github.event.pull_request.title }}
|
||||||
run: |
|
run: |
|
||||||
title="${{ github.event.pull_request.title }}"
|
title_length=${#TITLE}
|
||||||
title_length=${#title}
|
|
||||||
if [ $title_length -gt 72 ]
|
if [ $title_length -gt 72 ]
|
||||||
then
|
then
|
||||||
echo "PR title is too long (greater than 72 characters)"
|
echo "PR title is too long (greater than 72 characters)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user