Workflow: Try using the branch for pushes, and sha for PRs
This commit is contained in:
parent
ea0b4bdeed
commit
593121e5a7
@ -17,8 +17,23 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Clone
|
- name: Clone
|
||||||
run: |
|
run: |
|
||||||
|
# For pull request events, checkout using GITHUB_SHA
|
||||||
|
# For push events, checkout using GITHUB_REF_NAME
|
||||||
|
if [[ $GITHUB_EVENT_NAME == "pull_request" ]]; then
|
||||||
|
REF=${GITHUB_SHA}
|
||||||
|
else
|
||||||
|
REF=${GITHUB_REF_NAME}
|
||||||
|
fi
|
||||||
|
|
||||||
rm -rf ${{ github.workspace }}/current
|
rm -rf ${{ github.workspace }}/current
|
||||||
git clone --progress https://dev.sp-tarkov.com/${{ github.repository }}.git --branch ${{ github.ref }} ${{ github.workspace }}/current
|
git clone https://dev.sp-tarkov.com/${{ github.repository }}.git ${{ github.workspace }}/current
|
||||||
|
|
||||||
|
cd ${{ github.workspace }}/current
|
||||||
|
git checkout $REF
|
||||||
|
env:
|
||||||
|
GITHUB_SHA: ${{ github.sha }}
|
||||||
|
GITHUB_REF_NAME: ${{ github.ref_name }}
|
||||||
|
GITHUB_EVENT_NAME: ${{ github.event_name }}
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Pull LFS Files
|
- name: Pull LFS Files
|
||||||
|
Loading…
Reference in New Issue
Block a user