Skip to content
This repository was archived by the owner on Nov 2, 2023. It is now read-only.

Commit ff79373

Browse files
BSWANGDrmagicE
authored andcommitted
fix ci git permission
add src to safe dir refer: https://github.blog/2022-04-12-git-security-vulnerability-announced/ Signed-off-by: bingshen.wbs <[email protected]>
1 parent 1d5fad0 commit ff79373

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,5 @@ jobs:
6666
- name: Build and push
6767
env:
6868
REPO: ${{ env.ALI_REGISTRY }}
69-
run: make REPO=$REPO push
69+
run: make REPO=$REPO push
70+
if: ${{ github.event_name != 'pull_request' && github.event.action != 'unassigned' }}

hack/lib/release-images.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ build_multi_arch_binaries() {
5656
apk --no-cache add bash git; \
5757
cd /opt/src; umask 0022; \
5858
rm -rf ${YURT_BIN_DIR}/* ;"
59+
sub_commands+="git config --global --add safe.directory /opt/src; "
5960
sub_commands+="GOARCH=amd64 bash ./hack/make-rules/build.sh ${bin_target}; "
6061
sub_commands+="chown -R $(id -u):$(id -g) /opt/src/_output"
6162

0 commit comments

Comments
 (0)