Ignore merge conflicts on pro submodule checks
This commit is contained in:
parent
2998bf094a
commit
5939a3f4f1
|
@ -231,27 +231,28 @@ jobs:
|
||||||
echo "pro_commit=$pro_commit"
|
echo "pro_commit=$pro_commit"
|
||||||
echo "pro_commit=$pro_commit" >> "$GITHUB_OUTPUT"
|
echo "pro_commit=$pro_commit" >> "$GITHUB_OUTPUT"
|
||||||
echo "base_commit=$base_commit"
|
echo "base_commit=$base_commit"
|
||||||
echo "base_commit=$base_commit" >> "$GITHUB_OUTPUT"
|
|
||||||
|
base_commit_excluding_merges=$(git log --no-merges -n 1 --format=format:%H $base_commit)
|
||||||
|
echo "base_commit_excluding_merges=$base_commit_excluding_merges"
|
||||||
|
echo "base_commit_excluding_merges=$base_commit_excluding_merges" >> "$GITHUB_OUTPUT"
|
||||||
else
|
else
|
||||||
echo "Nothing to do - branch to branch merge."
|
echo "Nothing to do - branch to branch merge."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Check submodule merged to base branch
|
- name: Check submodule merged to base branch
|
||||||
if: ${{ steps.get_pro_commits.outputs.base_commit != '' }}
|
if: ${{ steps.get_pro_commits.outputs.base_commit_excluding_merges != '' }}
|
||||||
uses: actions/github-script@v7
|
run: |
|
||||||
with:
|
base_commit_excluding_merges=${{ steps.get_pro_commits.outputs.base_commit_excluding_merges }}'
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
any_commit=$(git log origin/master...$base_commit_excluding_merges)
|
||||||
script: |
|
if [ -n "$any_commit" ]; then
|
||||||
const submoduleCommit = '${{ steps.get_pro_commits.outputs.pro_commit }}';
|
echo "An error occurred: <error_message>"
|
||||||
const baseCommit = '${{ steps.get_pro_commits.outputs.base_commit }}';
|
echo 'Submodule commit does not match the latest commit on the "${{ steps.get_pro_commits.outputs.target_branch }}" branch.'
|
||||||
|
echo 'Refer to the pro repo to merge your changes: https://github.com/Budibase/budibase-pro/blob/master/docs/getting_started.md'
|
||||||
|
|
||||||
if (submoduleCommit !== baseCommit) {
|
exit 1
|
||||||
console.error('Submodule commit does not match the latest commit on the "${{ steps.get_pro_commits.outputs.target_branch }}" branch.');
|
else
|
||||||
console.error('Refer to the pro repo to merge your changes: https://github.com/Budibase/budibase-pro/blob/master/docs/getting_started.md')
|
echo 'All good, the submodule had been merged and setup correctly!'
|
||||||
process.exit(1);
|
fi
|
||||||
} else {
|
|
||||||
console.log('All good, the submodule had been merged and setup correctly!')
|
|
||||||
}
|
|
||||||
|
|
||||||
check-accountportal-submodule:
|
check-accountportal-submodule:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
Loading…
Reference in New Issue