fix interpolation issues

This commit is contained in:
David Hiendl 2023-12-05 15:21:01 +01:00
parent 0450511708
commit 01e16a96e8

View File

@ -18,10 +18,13 @@ runs:
run: | run: |
echo "Starting docket-fix-socket-perm A" echo "Starting docket-fix-socket-perm A"
- shell: bash - shell: bash
env:
SOCKET_PATH: ${{ inputs.socket-path }}
WORKAROUND_GROUP: ${{ inputs.workaround-group }}
run: | run: |
echo "Starting docket-fix-socket-perm B" echo "Starting docket-fix-socket-perm B"
SOCK_OWNER_GID=$(stat -c %g ${{ inputs.socket-path }}) SOCK_OWNER_GID=$(stat -c %g $SOCKET_PATH)
echo "${{ inputs.socket-path }} is owned by gid=$SOCK_OWNER_GID" echo "$SOCKET_PATH is owned by gid=$SOCK_OWNER_GID"
RUNNING_AS_USER=$(whoami) RUNNING_AS_USER=$(whoami)
echo "running as user: $RUNNING_AS_USER" echo "running as user: $RUNNING_AS_USER"
@ -43,10 +46,10 @@ runs:
exit 0 exit 0
fi fi
echo "Group for gid=$SOCK_OWNER_GID does not exist, creating workaround group: ${{ input.workaround-group }}" echo "Group for gid=$SOCK_OWNER_GID does not exist, creating workaround group: $WORKAROUND_GROUP"
$SUDO_PREFIX groupadd -g $SOCK_OWNER_GID ${{ input.workaround-group }} $SUDO_PREFIX groupadd -g $SOCK_OWNER_GID $WORKAROUND_GROUP
echo "Group for gid=$SOCK_OWNER_GID created" echo "Group for gid=$SOCK_OWNER_GID created"
echo "Adding user to workaround group: ${{ input.workaround-group }}" echo "Adding user to workaround group: $WORKAROUND_GROUP"
$SUDO_PREFIX usermod -aG ${{ input.workaround-group }} $RUNNING_AS_USER $SUDO_PREFIX usermod -aG $WORKAROUND_GROUP $RUNNING_AS_USER
echo "Added user to workaround group" echo "Added user to workaround group"