Skip to content

Simplify checkout of submodules in GitHub workflows (with support for git describe) #3185

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 11 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,9 @@ jobs:
sudo apt-get install -y libgeoip-dev:${{ matrix.platform.arch }} \
libfuzzy-dev:${{ matrix.platform.arch }}
- uses: actions/checkout@v4
- name: get submodules
# get submodules manually for git describe to work during build
run: |
git submodule init
git submodule update
with:
submodules: true
fetch-depth: 0
- name: build.sh
run: ./build.sh
- name: configure
Expand Down Expand Up @@ -108,11 +106,9 @@ jobs:
bison \
flex
- uses: actions/checkout@v4
- name: get submodules
# get submodules manually for git describe to work during build
run: |
git submodule init
git submodule update
with:
submodules: true
fetch-depth: 0
- name: build.sh
run: ./build.sh
- name: configure
Expand Down Expand Up @@ -141,11 +137,9 @@ jobs:
- {label: "wo libxml", opt: "-WITHOUT_LIBXML2=ON" }
steps:
- uses: actions/checkout@v4
- name: Get submodules
# get submodules manually for git describe to work during build
run: |
git submodule init
git submodule update
with:
submodules: true
fetch-depth: 0
- name: Install Conan
run: |
pip3 install conan --upgrade
Expand Down Expand Up @@ -188,10 +182,11 @@ jobs:
run: |
sudo apt-get update -y -qq
sudo apt-get install -y cppcheck
- name: Get libModSecurity v3 source
- name: Checkout source
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Configure libModSecurity
run: |
./build.sh
Expand Down
2 changes: 1 addition & 1 deletion build/win32/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ WORKDIR C:\
RUN cmd.exe /C md %SRC_DIR%

# libModSecurity
WORKDIR ${SCR_DIR}
WORKDIR ${SRC_DIR}

ARG MOD_SECURITY_TAG=v3/master
RUN git clone -c advice.detachedHead=false --depth 1 --branch %MOD_SECURITY_TAG% https://github.com/owasp-modsecurity/ModSecurity.git
Expand Down
Loading