Files
aptly/system/run-aptly-cmd
2024-08-03 00:14:26 +02:00

18 lines
370 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; export HOME=/home/runner; export PATH=\$PATH:/app/build; $cmd"