Skip to content

Commit 43de5a5

Browse files
melinathanavada
authored andcommitted
Remove submodule and prevent future submodule additions (GoogleCloudPlatform#11846)
1 parent 752d473 commit 43de5a5

File tree

4 files changed

+24
-3
lines changed

4 files changed

+24
-3
lines changed
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: "Disallow submodules"
2+
permissions: read-all
3+
4+
on:
5+
pull_request
6+
7+
jobs:
8+
disallow-submodules:
9+
runs-on: ubuntu-22.04
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.2
13+
- name: Check for submodules
14+
run: |
15+
output=$(git submodule status --recursive 2>&1)
16+
if [ ! -z $output ]; then
17+
echo $output
18+
echo "Submodules are not allowed"
19+
exit 1
20+
else
21+
echo "No submodules found"
22+
fi

.github/workflows/repository-documentation-deploy.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.2
1717
with:
18-
submodules: true # Fetch Hugo themes (true OR recursive)
18+
submodules: false # Fetch Hugo themes (true OR recursive)
1919
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
2020

2121
- name: Setup Hugo

.github/workflows/repository-documentation-test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.2
1515
with:
16-
submodules: true # Fetch Hugo themes (true OR recursive)
16+
submodules: false # Fetch Hugo themes (true OR recursive)
1717
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
1818

1919
- name: Setup Hugo

magician-vcr-eap

-1
This file was deleted.

0 commit comments

Comments
 (0)