chore(bors): merge pull request #903 #2695
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Submodule Branch Check | |
on: | |
pull_request: | |
types: ['opened', 'edited', 'reopened', 'synchronize'] | |
push: | |
branches: | |
- develop | |
- 'release/**' | |
- staging | |
jobs: | |
submodule-branch: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
env: | |
checkout_token: ${{ secrets.ORG_CI_GITHUB }} | |
if: ${{ env.checkout_token == '' }} | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
- uses: actions/checkout@v4 | |
env: | |
checkout_token: ${{ secrets.ORG_CI_GITHUB }} | |
if: ${{ env.checkout_token != '' }} | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
token: ${{ secrets.ORG_CI_GITHUB }} | |
- name: Check root submodules branch | |
run: | | |
pr_branch="${{ github.event.pull_request.base.ref }}" | |
if [ -n "$pr_branch" ]; then | |
check_branch="$pr_branch" | |
else | |
check_branch="${{ github.ref_name }}" | |
fi | |
./scripts/git/set-submodule-branches.sh --branch "$check_branch" | |
cat .gitmodules | |
git diff --exit-code ".gitmodules" | |
- name: Check submodules HEAD points to branch | |
run: | | |
./scripts/git/check-submodule-branches.sh |