Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
tilelang
Commits
a2a32dea
Commit
a2a32dea
authored
Mar 31, 2025
by
Wenhao Xie
Committed by
LeiWang1999
Mar 31, 2025
Browse files
[BugFix] Fix unintended Git config overrides in CI runners (#306)
parent
edbb9b6d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
.github/workflows/publish_docs.yml
.github/workflows/publish_docs.yml
+3
-6
No files found.
.github/workflows/publish_docs.yml
View file @
a2a32dea
...
...
@@ -22,16 +22,13 @@ jobs:
run
:
|
chmod +x ./maint/scripts/build_docs.sh
./maint/scripts/build_docs.sh
-
name
:
Configure git
run
:
|
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
-
name
:
Push to another repo
env
:
TARGET_REPO
:
${{ secrets.TARGET_REPO }}
TARGET_TOKEN
:
${{ secrets.TARGET_TOKEN }}
run
:
|
git config --global url."https://$TARGET_TOKEN@github.com".insteadOf "https://github.com"
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git clone https://github.com/${TARGET_REPO}.git target_repo
cd target_repo
git checkout main
...
...
@@ -41,7 +38,7 @@ jobs:
if [[ -n "$(git status --porcelain)" ]]; then
# If there are changes, commit and push
git commit -m "Update docs"
git push https://github.com/${TARGET_REPO}.git main
git push https://github
-actions[bot]:$TARGET_TOKEN@github
.com/${TARGET_REPO}.git main
else
echo "No changes detected, skipping commit and push."
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment