Skip to content

Commit

Permalink
Merge pull request #634 from Som-Energia/IMP_allow_to_choose_GA_erp_b…
Browse files Browse the repository at this point in the history
…ranch

Allow to choose ERP branch with a tag
  • Loading branch information
xavierteres authored Jun 13, 2024
2 parents 1f99dda + 4094153 commit 6fa4e4c
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion .github/workflows/integration_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,35 @@ jobs:
output += ' -m {}'.format(module)
print(output)
set-erp-branch:
name: Set ERP Branch
runs-on: ubuntu-latest
outputs:
erp_branch: ${{ steps.set_erp_branch.outputs.erpbranch }}
steps:
- name: Set ERP Branch
id: set_erp_branch
env:
PR_LABEL_LIST: ${{ toJson(github.event.pull_request.labels.*.name) }}
run: |
json_tags='${{ env.PR_LABEL_LIST }}'
array_tags=$(echo "$json_tags" | jq -r '.[]')
branch="rolling_erp01" # default branch
for tag in $array_tags; do
if [[ $tag == GHA_branch_* ]]; then
branch=${tag#GHA_branch_}
break
fi
done
echo "Using ERP branch $branch"
echo "erpbranch=$branch" >> $GITHUB_OUTPUT
erp-tests-module:
name: Run test PR
if: ${{needs.get-pr-modified-files.outputs.module_list}}
uses: ./.github/workflows/reusable_workflow.yml
needs: get-pr-modified-files
needs: [get-pr-modified-files, set-erp-branch]
with:
module: ${{needs.get-pr-modified-files.outputs.module_list}}
erpbranch: ${{needs.set-erp-branch.outputs.erp_branch}}
secrets: inherit

0 comments on commit 6fa4e4c

Please sign in to comment.