Updating CI to only check pro when going to base branch.

This commit is contained in:
mike12345567 2023-10-10 11:34:14 +01:00
parent fa5e340e60
commit 4b73f636fc
1 changed files with 13 additions and 8 deletions

View File

@ -270,18 +270,23 @@ jobs:
if [[ $branch == "master" ]]; then if [[ $branch == "master" ]]; then
base_commit=$(git rev-parse origin/master) base_commit=$(git rev-parse origin/master)
else else if [[ $branch == "develop" ]]; then
base_commit=$(git rev-parse origin/develop) base_commit=$(git rev-parse origin/develop)
fi fi
echo "target_branch=$branch" if [[ ! -z $base_commit ]]; then
echo "target_branch=$branch" >> "$GITHUB_OUTPUT" echo "target_branch=$branch"
echo "pro_commit=$pro_commit" echo "target_branch=$branch" >> "$GITHUB_OUTPUT"
echo "pro_commit=$pro_commit" >> "$GITHUB_OUTPUT" echo "pro_commit=$pro_commit"
echo "base_commit=$base_commit" echo "pro_commit=$pro_commit" >> "$GITHUB_OUTPUT"
echo "base_commit=$base_commit" >> "$GITHUB_OUTPUT" echo "base_commit=$base_commit"
echo "base_commit=$base_commit" >> "$GITHUB_OUTPUT"
else
echo "Nothing to do - branch to branch merge."
fi
- name: Check submodule merged to develop - name: Check submodule merged to base branch
if: ${{ base_commit != '' }}
uses: actions/github-script@v4 uses: actions/github-script@v4
with: with:
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}