Files
aptly/system/run-golangci-lint
André Roth 40eb4b4751 docker-lint: use go 1.19 compatible golangci-lint version
- use same user in docker container
- use GOPATH in source dir to prevent downloading all dependencies on each run
- add make clean
2024-08-03 00:14:26 +02:00

18 lines
454 B
Bash
Executable File

#!/bin/sh
# cleanup
rm -rf /app/tmp
rm -rf /tmp/aptly*
usermod -u `stat -c %u /app` aptly >/dev/null
chown -R `stat -c %u /app` /var/lib/aptly
# use same /home/runner dir as in github workflow
chown -R `stat -c %u /app` /home/runner
cmd=$@
if [ -z "$cmd" ]; then
cmd="bash"
fi
su aptly -c "cd /app; GOPATH=/app/.go go install github.com/golangci/golangci-lint/cmd/golangci-lint@$GOLANGCI_LINT_VERSION; PATH=\$PATH:/app/.go/bin golangci-lint run"