Compare commits

...

3 commits

Author SHA1 Message Date
2684fb1239 gitea.nulo.in: Use Alpine 3.16
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-06-24 07:33:46 -03:00
c3ed17ba45 Add .woodpecker.yml for gitea.nulo.in 2022-06-24 07:33:46 -03:00
a0c184866b Allow hidden .READMEs 2022-06-24 07:33:35 -03:00
2 changed files with 19 additions and 9 deletions

18
.woodpecker.yml Normal file
View file

@ -0,0 +1,18 @@
pipeline:
build:
image: docker.io/alpine:3.16
commands:
- apk add git nodejs npm go make rsync openssh-client-default
- GOOS=linux GOARCH=amd64 LDFLAGS="-linkmode external -extldflags '-static' $LDFLAGS" TAGS="bindata sqlite sqlite_unlock_notify" make build
- eval $(ssh-agent -s)
- echo "$${SSH_KEY}" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- echo "[nulo.in]:420,[186.136.121.7]:420 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBGPkgRVWYcVcgjI0xAjDgZQsYuXU9edcya8zna01ibyUMlfKHIMD9yOoq0R+fQPTCqwiol/2tKMPJ2hlKshc+H8=" > ~/.ssh/known_hosts
- rsync --rsh='ssh -p420' --progress --chmod=755 gitea diablo@nulo.in:gitea
- ssh -p420 diablo@nulo.in 'doas mv ~diablo/gitea /usr/local/bin/gitea && doas sv restart gitea'
when:
branch: gitea.nulo.in
event: push
secrets:
- ssh_key

View file

@ -315,13 +315,5 @@ func IsMarkupFile(name, markup string) bool {
// Note that the '.' should be provided in ext, e.g ".md" // Note that the '.' should be provided in ext, e.g ".md"
func IsReadmeFile(name string, ext ...string) bool { func IsReadmeFile(name string, ext ...string) bool {
name = strings.ToLower(name) name = strings.ToLower(name)
if len(ext) > 0 { return name == "readme" || strings.Index(name, "readme.") == 0 || strings.Index(name, ".readme.") == 0
return name == "readme"+ext[0]
}
if len(name) < 6 {
return false
} else if len(name) == 6 {
return name == "readme"
}
return name[:7] == "readme."
} }