mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-07 03:53:38 +00:00
CI: Fix checkers tripping over empty GitHub Actions references
When the internal git reference is nonexistent, GitHub Actions seems to convert that value into a hash made up of only zeroes. As that hash will be commit-ish it will pass verification. git cat-file will fail if the provided reference cannot be resolved in the repository so should be the safer choice.
This commit is contained in:
parent
3a347fe327
commit
ea8ea39e29
2
.github/actions/check-changes/action.yaml
vendored
2
.github/actions/check-changes/action.yaml
vendored
|
@ -38,7 +38,7 @@ runs:
|
|||
shopt -s extglob
|
||||
shopt -s dotglob
|
||||
|
||||
if ! git rev-parse --verify ${GIT_BASE_REF} &> /dev/null; then
|
||||
if ! git cat-file -e "${GIT_BASE_REF}" &> /dev/null; then
|
||||
echo "::warning::Provided base reference ${GIT_BASE_REF} is invalid"
|
||||
if [[ "${USE_FALLBACK}" == 'true' ]]; then
|
||||
GIT_BASE_REF='HEAD~1'
|
||||
|
|
2
.github/actions/qt-xml-validator/action.yaml
vendored
2
.github/actions/qt-xml-validator/action.yaml
vendored
|
@ -46,7 +46,7 @@ runs:
|
|||
shopt -s extglob
|
||||
shopt -s globstar
|
||||
|
||||
if ! git rev-parse --verify "${GITHUB_REF_BEFORE}" &> /dev/null; then
|
||||
if ! git cat-file -e "${GITHUB_REF_BEFORE}" &> /dev/null; then
|
||||
GITHUB_REF_BEFORE='4b825dc642cb6eb9a060e54bf8d69288fbee4904'
|
||||
fi
|
||||
|
||||
|
|
2
.github/actions/run-clang-format/action.yaml
vendored
2
.github/actions/run-clang-format/action.yaml
vendored
|
@ -43,7 +43,7 @@ runs:
|
|||
: Run clang-format 🐉
|
||||
if (( ${+RUNNER_DEBUG} )) setopt XTRACE
|
||||
|
||||
if ! git rev-parse --verify ${GITHUB_REF_BEFORE} &> /dev/null; then
|
||||
if ! git cat-file -e ${GITHUB_REF_BEFORE} &> /dev/null; then
|
||||
GITHUB_REF_BEFORE='4b825dc642cb6eb9a060e54bf8d69288fbee4904'
|
||||
fi
|
||||
|
||||
|
|
2
.github/actions/run-cmake-format/action.yaml
vendored
2
.github/actions/run-cmake-format/action.yaml
vendored
|
@ -42,7 +42,7 @@ runs:
|
|||
: Run cmake-format 🎛️
|
||||
if (( ${+RUNNER_DEBUG} )) setopt XTRACE
|
||||
|
||||
if ! git rev-parse --verify ${GITHUB_REF_BEFORE} &> /dev/null; then
|
||||
if ! git cat-file -e ${GITHUB_REF_BEFORE} &> /dev/null; then
|
||||
GITHUB_REF_BEFORE='4b825dc642cb6eb9a060e54bf8d69288fbee4904'
|
||||
fi
|
||||
|
||||
|
|
2
.github/actions/run-swift-format/action.yaml
vendored
2
.github/actions/run-swift-format/action.yaml
vendored
|
@ -42,7 +42,7 @@ runs:
|
|||
: Run swift-format 🔥
|
||||
if (( ${+RUNNER_DEBUG} )) setopt XTRACE
|
||||
|
||||
if ! git rev-parse --verify ${GITHUB_REF_BEFORE} &> /dev/null; then
|
||||
if ! git cat-file -e ${GITHUB_REF_BEFORE} &> /dev/null; then
|
||||
GITHUB_REF_BEFORE='4b825dc642cb6eb9a060e54bf8d69288fbee4904'
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue