add git config
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
nyyu 2021-08-20 07:09:29 +02:00
parent 1d6291e5eb
commit 3c1933b334
3 changed files with 9 additions and 4 deletions

View File

@ -18,8 +18,8 @@ steps:
- useradd build -m - useradd build -m
- "echo 'build ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers" - "echo 'build ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers"
- chown -R build:build . - chown -R build:build .
- sudo -u build --preserve-env=PGP_KEY --preserve-env=PGP_PWD --preserve-env=PGP_ID sh -c 'mkdir ~/.gnupg && echo -e "default-cache-ttl 3600\nallow-preset-passphrase" > ~/.gnupg/gpg-agent.conf && echo "$PGP_KEY" | gpg --import --no-tty --batch --yes && echo "$PGP_PWD" | /usr/lib/gnupg/gpg-preset-passphrase --preset $PGP_ID' - sudo -u build --preserve-env=PGP_KEY,PGP_PWD,PGP_ID sh -c 'mkdir ~/.gnupg && echo -e "default-cache-ttl 3600\nallow-preset-passphrase" > ~/.gnupg/gpg-agent.conf && echo "$PGP_KEY" | gpg --import --no-tty --batch --yes && echo "$PGP_PWD" | /usr/lib/gnupg/gpg-preset-passphrase --preset $PGP_ID'
- sudo -u build sh -c './build.sh' - sudo -u build --preserve-env=DRONE_GIT_HTTP_URL,DRONE_SOURCE_BRANCH sh -c './build.sh'
environment: environment:
PGP_KEY: PGP_KEY:
from_secret: PGP_KEY from_secret: PGP_KEY

View File

@ -16,10 +16,10 @@ update_pkg() {
then then
makepkg --printsrcinfo > .SRCINFO makepkg --printsrcinfo > .SRCINFO
git add .SRCINFO PKGBUILD git add .SRCINFO PKGBUILD
git commit -m "$(basename $(pwd)): update to $ver" git commit -m "$(basename $(pwd)): update to $ver [CI SKIP]"
if [ $? -eq 0 ] if [ $? -eq 0 ]
then then
git push git push --set-upstream origin $DRONE_SOURCE_BRANCH
fi fi
fi fi

View File

@ -29,6 +29,11 @@ build() {
fi fi
} }
env
git config --global user.email "drone@nyyu.dev"
git config --global user.name "drone"
git remote set-url origin $DRONE_GIT_HTTP_URL
for d in */ ; do for d in */ ; do
cd "$d" || continue cd "$d" || continue
build build