Skip to content

Commit

Permalink
print git username for git-checkout (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
wangzhuzhen authored Feb 27, 2024
1 parent 129e32e commit 1329655
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion actions/git-checkout/1.0/dice.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
### job 配置项
jobs:
git-checkout:
image: registry.erda.cloud/erda-actions/git-checkout-action:1.0-20230516131755-d565716
image: registry.erda.cloud/erda-actions/git-checkout-action:1.0-20240227100946-aed655a
resources:
cpu: 0.5
mem: 1024
Expand Down
5 changes: 5 additions & 0 deletions actions/git-checkout/1.0/internal/assets/internal_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ if [ $isCommit = true ]; then
else
echo 'clone mode'
pwd

gitusername=$(git config user.name)
echo "git config user.name: $gitusername"
echo "git command: git clone --single-branch $depthflag $uri $branchflag $destination"

git clone --single-branch $depthflag $uri $branchflag $destination
cd $destination
git fetch origin refs/notes/*:refs/notes/*
Expand Down

0 comments on commit 1329655

Please sign in to comment.