4.8.1. GitHub Workflow Example: Handling Submodules#
Example: GitHub Workflow (.github/workflows/ci.yml
)
name: CI with Submodules
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository with submodules
uses: actions/checkout@v2
with:
submodules: true # Initialize and update submodules
fetch-depth: 0 # Ensure full history is fetched
- name: Build Project
run: |
# Example build command
make build