fix: updated the workflow to checkout target branch specified by the user (#26705)

This commit is contained in:
Aarif
2021-02-24 17:53:40 +05:00
committed by GitHub
parent ac3d6359a0
commit 441bfffd9b

View File

@@ -20,7 +20,13 @@ jobs:
python-version: ["3.8"]
steps:
- name: setup target branch
run: echo "target_branch=$(if ['${{ github.event.inputs.branch }}' = '']; then echo 'master'; else echo '${{ github.event.inputs.branch }}'; fi)" >> $GITHUB_ENV
- uses: actions/checkout@v1
with:
ref: ${{ env.target_branch }}
- name: setup python
uses: actions/setup-python@v2
with:
@@ -34,9 +40,6 @@ jobs:
cd $GITHUB_WORKSPACE
make upgrade
- name: setup target branch
run: echo "target_branch=$(if ['${{ github.event.inputs.branch }}' = '']; then echo 'master'; else echo '${{ github.event.inputs.branch }}'; fi)" >> $GITHUB_ENV
- name: setup testeng-ci
run: |
git clone https://github.com/edx/testeng-ci.git