Skip to content

Commit fdb5931

Browse files
fix: git config system (#390)
Changing the Make target Docker command to mimic the GitHub Actions environment to cause the same failure. * https://git-scm.com/docs/git-config#Documentation/git-config.txt---global ``` --global For writing options: write to global ~/.gitconfig file rather than the repository .git/config, write to $XDG_CONFIG_HOME/git/config file if this file exists and the ~/.gitconfig file doesn’t. For reading options: read only from global ~/.gitconfig and from $XDG_CONFIG_HOME/git/config rather than from all available files. ``` * https://git-scm.com/docs/git-config#Documentation/git-config.txt---system ``` For writing options: write to system-wide $(prefix)/etc/gitconfig rather than the repository .git/config. For reading options: read only from system-wide $(prefix)/etc/gitconfig rather than from all available files. ```
1 parent 62de70d commit fdb5931

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
FROM alpine:3.22.2@sha256:4b7ce07002c69e8f3d704a9c5d6fd3053be500b7f1c69fc0d80990c2ad8dd412
22

33
RUN apk add --no-cache \
4-
git=2.49.1-r0
4+
git=2.49.1-r0 && \
5+
git config --system --add safe.directory '*'
56

67
COPY ./target/x86_64-unknown-linux-musl/release/conventional_commits_linter /usr/local/bin/
78

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ publish-crate:
108108
.PHONY: dogfood-docker
109109
dogfood-docker: release
110110
docker build -t conventional_commits_linter -f Dockerfile .
111-
docker run $(DOCKER_RUN_WRITE_OPTS) conventional_commits_linter --verbose $(FROM)
111+
docker run $(DOCKER_RUN_OPTS) -e HOME=/github/home -e GITHUB_ACTIONS=true -e CI=true conventional_commits_linter --verbose $(FROM)
112112

113113
.PHONY: publish-docker
114114
publish-docker: release

0 commit comments

Comments
 (0)