Skip to content

Commit fbf0aae

Browse files
authored
Update linux.yml
1 parent bf743e0 commit fbf0aae

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

.github/workflows/linux.yml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -60,26 +60,24 @@ jobs:
6060
- name: Get repository name
6161
run: echo "REPO_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
6262

63-
- name: Clone repository with submodules
64-
uses: actions/checkout@v4
65-
with:
66-
submodules: recursive
67-
path: ${{ env.REPO_NAME }}
68-
69-
- name: Trust repository and submodules
63+
- name: Trust main repo (pre-submodule)
7064
run: |
71-
find "${{ github.workspace }}/${{ env.REPO_NAME }}" -type d -name ".git" | while read gitdir; do
72-
safe_dir=$(dirname "$gitdir")
73-
echo "Adding safe.directory: $safe_dir"
74-
git config --global --add safe.directory "$safe_dir"
75-
done
65+
git config --global --add safe.directory "${{ github.workspace }}/${{ env.REPO_NAME }}"
7666
77-
- name: Reset project permissions and update submodules
67+
- name: Initialize submodules
7868
run: |
7969
cd "${{ env.REPO_NAME }}"
8070
git submodule deinit -f .
8171
git submodule update --init --recursive --depth=1
8272
73+
- name: Trust all submodule directories
74+
run: |
75+
find "${{ github.workspace }}/${{ env.REPO_NAME }}" -type d -name ".git" | while read gitdir; do
76+
safe_dir=$(dirname "$gitdir")
77+
echo "Adding to safe.directory: $safe_dir"
78+
git config --global --add safe.directory "$safe_dir"
79+
done
80+
8381
- name: Install jinja2-cli
8482
run: |
8583
pip install --user jinja2-cli

0 commit comments

Comments
 (0)