From 441bfffd9b12922cae88491f6988d22680a31454 Mon Sep 17 00:00:00 2001 From: Aarif Date: Wed, 24 Feb 2021 17:53:40 +0500 Subject: [PATCH] fix: updated the workflow to checkout target branch specified by the user (#26705) --- .github/workflows/upgrade-python-requirements.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/upgrade-python-requirements.yml b/.github/workflows/upgrade-python-requirements.yml index c87666e706..56370551df 100644 --- a/.github/workflows/upgrade-python-requirements.yml +++ b/.github/workflows/upgrade-python-requirements.yml @@ -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