fix_: properly call commit_check and checkout forks (#5863)

This commit is contained in:
Igor Sirotin 2024-09-24 10:51:59 +01:00 committed by GitHub
parent a84f78f8aa
commit 2ca34489db
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 8 deletions

View File

@ -17,20 +17,19 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: ${{ env.GITHUB_HEAD_REF }}
fetch-tags: true
- name: Fetch tags
run: |
git fetch --tags --quiet
git checkout ${{ github.event.pull_request.head.ref }}
fetch-depth: 0
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
- name: Check commit message
id: check_commit_message
run: |
set +e
output=$(./_assets/scripts/commit_check.sh 2>&1)
base_sha=${{ github.event.pull_request.base.sha }}
head_sha=${{ github.event.pull_request.head.sha }}
output=$(./_assets/scripts/commit_check.sh "${base_sha}" "${head_sha}" 2>&1)
exit_code=$?
echo "${output}" | sed '$d'