Submodule Check

submodule-check

This action will assert that the calling repository’s submodules are all on commits in the default branch’s commit history for each respective submodule. Essentially requires submodules to be on a “prod-ready” commit to be merged. This action is intended to be used to gate pull requests where the repository’s default branch is the base branch in the pull request.

Templates

# This template is intended to be incorporated as a workflow in another repository for pull request gating
name: Run Submodule Check
on:
  pull_request:
    # branches: [main] # Uncomment to gate only pull requests to main (or another default branch)
    types: [opened, edited, synchronize, reopened]

jobs:
  run-submodule-check:
    runs-on: ubuntu-latest
    steps:
      - name: Run the submodule check workflow
        uses: GenapsysInc/internal-actions/reusable-actions/submodule-check@main
        with:
          token: ${{ secrets.GH_REST_API_TOKEN }}