Skip to content

Commit adba86e

Browse files
authored
Merge pull request #3185 from eduar-hte/git-describe
Simplify checkout of submodules in GitHub workflows (with support for git describe)
2 parents de8646e + f4d3538 commit adba86e

File tree

1 file changed

+11
-16
lines changed

1 file changed

+11
-16
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,9 @@ jobs:
5757
sudo apt-get install -y libgeoip-dev:${{ matrix.platform.arch }} \
5858
libfuzzy-dev:${{ matrix.platform.arch }}
5959
- uses: actions/checkout@v4
60-
- name: get submodules
61-
# get submodules manually for git describe to work during build
62-
run: |
63-
git submodule init
64-
git submodule update
60+
with:
61+
submodules: true
62+
fetch-depth: 0
6563
- name: build.sh
6664
run: ./build.sh
6765
- name: configure
@@ -108,11 +106,9 @@ jobs:
108106
bison \
109107
flex
110108
- uses: actions/checkout@v4
111-
- name: get submodules
112-
# get submodules manually for git describe to work during build
113-
run: |
114-
git submodule init
115-
git submodule update
109+
with:
110+
submodules: true
111+
fetch-depth: 0
116112
- name: build.sh
117113
run: ./build.sh
118114
- name: configure
@@ -141,11 +137,9 @@ jobs:
141137
- {label: "wo libxml", opt: "-WITHOUT_LIBXML2=ON" }
142138
steps:
143139
- uses: actions/checkout@v4
144-
- name: Get submodules
145-
# get submodules manually for git describe to work during build
146-
run: |
147-
git submodule init
148-
git submodule update
140+
with:
141+
submodules: true
142+
fetch-depth: 0
149143
- name: Install Conan
150144
run: |
151145
pip3 install conan --upgrade
@@ -188,10 +182,11 @@ jobs:
188182
run: |
189183
sudo apt-get update -y -qq
190184
sudo apt-get install -y cppcheck
191-
- name: Get libModSecurity v3 source
185+
- name: Checkout source
192186
uses: actions/checkout@v4
193187
with:
194188
submodules: true
189+
fetch-depth: 0
195190
- name: Configure libModSecurity
196191
run: |
197192
./build.sh

0 commit comments

Comments
 (0)