mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-04-24 07:17:17 +00:00
build: allow to execute command from container from entrypoint
This commit is contained in:
parent
c4a56f1454
commit
7c7804a9f4
2
.github/workflows/setup.yml
vendored
2
.github/workflows/setup.yml
vendored
@ -15,9 +15,9 @@ jobs:
|
||||
|
||||
container:
|
||||
image: archlinux:base
|
||||
options: --privileged -w /build
|
||||
volumes:
|
||||
- ${{ github.workspace }}:/build
|
||||
options: --privileged -w /build
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
@ -17,9 +17,9 @@ jobs:
|
||||
|
||||
container:
|
||||
image: archlinux:base
|
||||
options: -w /build
|
||||
volumes:
|
||||
- ${{ github.workspace }}:/build
|
||||
options: -w /build
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
@ -57,6 +57,9 @@ ahriman "${AHRIMAN_DEFAULT_ARGS[@]}" service-setup "${AHRIMAN_SETUP_ARGS[@]}"
|
||||
# create machine-id which is required by build tools
|
||||
systemd-machine-id-setup &> /dev/null
|
||||
|
||||
# special workaround to emulate /bin/bash entrypoint if first argument starts with /
|
||||
[[ "$1" =~ ^/.* ]] && exec "$@"
|
||||
|
||||
# if AHRIMAN_FORCE_ROOT is set or command is unsafe we can run without sudo
|
||||
# otherwise we prepend executable by sudo command
|
||||
if [ -n "$AHRIMAN_FORCE_ROOT" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user