added .gitconfig to opencode image
CI / Build opencode docker images (push) Successful in 2m22s

This commit is contained in:
2026-09-16 07:22:17 +08:00
parent c919bde107
commit c95143417c
2 changed files with 62 additions and 1 deletions
+2 -1
View File
@@ -45,11 +45,12 @@ RUN --mount=type=cache,target=/var/cache/pacman pacman -S --noconfirm --needed j
RUN useradd -m -d /var/lib/opencode opencode
RUN mkdir /workspace
RUN chown opencode:opencode /workspace
ADD --chown=root:root ./opencode.json /etc/opencode/opencode.json
ADD --chown=opencode:opencode ./gitconfig /var/lib/opencode/.gitconfig
USER opencode
RUN pipx install pyright
RUN pipx install pip-tools
USER root
ADD --chown=opencode:opencode ./opencode.json /etc/opencode/opencode.json
RUN mkdir -p /usr/lib/opencode/addons
ADD --chmod=644 https://repo1.maven.org/maven2/org/projectlombok/lombok/1.18.46/lombok-1.18.46.jar /usr/lib/opencode/addons/lombok.jar
ENV OPENCODE_CONFIG=/etc/opencode/opencode.json
+60
View File
@@ -0,0 +1,60 @@
[user]
email = oggioni.walter@gmail.com
name = Walter Oggioni
[push]
default = simple
[http]
sslVerify = true
[difftool]
prompt = false
[alias]
# to save a few keystrokes
br = branch -avv
co = checkout
st = status --column
dt = difftool
dtg = difftool --
cm = commit -m
## new 'features'
## pretty logging: full tree
lg = log --all --graph --abbrev-commit --date=relative
# pretty logging: only commits leading to HEAD
lol = log --pretty=oneline --abbrev-commit --graph --decorate
# interactive apply patch (hunks)
ipatch = "!f() { git apply $1; git add -p; }; f"
# unstage everything
unstage = reset HEAD
# set the working tree as if the last comit hadn't been commited
undo = reset --soft HEAD^ cosmetics = commit -m 'Cosmetics'
# delete all local branches that have been merged but laster
clean-branches = "!f() { git branch --merged | grep -v '^* master$' | grep -v '^ master$' | xargs -r git branch -d ; }; f"
# Interactive rebase with the given number of latest commits
reb = "!r() { git rebase -i --autosquash HEAD~$1; }; r"
# Commit current stage area, in a commit that will automatically be a fixup in the next interactive rebase
tobesquashed = commit --fixup HEAD
[status]
relativePaths = true
[format]
pretty = %Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset
[core]
excludesfile = ~/.gitignore
[color "status"]
header = white dim
branch = yellow bold
added = green bold
changed = red bold
untracked = cyan
[color "diff"]
meta = yellow
commit = green
frag = magenta
old = red
new = green
whitespace = red reverse