fix: updated the workflow to checkout target branch specified by the user (#26705)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user