Skip to content

Commit

Permalink
alpine user
Browse files Browse the repository at this point in the history
  • Loading branch information
autarch committed Nov 3, 2024
1 parent c983614 commit 745327b
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 12 deletions.
17 changes: 5 additions & 12 deletions .github/workflows/test-bootstrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,11 @@ jobs:
set -e
set -x
mkdir -p "$HOME/bin"
UBI_DEBUG_BOOTSTRAP=1 TAG="${{ matrix.tag }}" ./bootstrap/${{ matrix.platform.script }}
if [ ! -x "$HOME/bin/ubi" ]; then
echo "Running ./bootstrap/${{ matrix.platform.script }} did not install ubi!"
exit 1
fi
"$HOME/bin/ubi" --project houseabsolute/precious --in "$HOME/bin"
if [ ! -x "$HOME/bin/precious" ]; then
echo "Running ubi did not install precious!"
exit 1
if [ $UID -eq 0 ]; then
adduser -D -H github
sudo -u github ./bootstrap/test/test-bootstrap.sh "${{ matrix.platform.script }}" "${{ matrix.tag }}"
else
./bootstrap/test/test-bootstrap.sh "${{ matrix.platform.script }}" "${{ matrix.tag }}"
fi
exit 0
Expand Down
24 changes: 24 additions & 0 deletions bootstrap/test/test-bootstrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/sh

set -e
set -x

SCRIPT="$1"
# shellcheck disable=SC2034 # This is used by the bootstrap scripts.
TAG="$2"

mkdir -p "$HOME/bin"

UBI_DEBUG_BOOTSTRAP=1 "./bootstrap/$SCRIPT"
if [ ! -x "$HOME/bin/ubi" ]; then
echo "Running ./bootstrap/$SCRIPT did not install ubi!"
exit 1
fi

"$HOME/bin/ubi" --project houseabsolute/precious --in "$HOME/bin"
if [ ! -x "$HOME/bin/precious" ]; then
echo "Running ubi did not install precious!"
exit 1
fi

exit 0

0 comments on commit 745327b

Please sign in to comment.