-
-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use it on Github Actions.
- Loading branch information
Andy C
committed
Dec 8, 2021
1 parent
ada5006
commit 2586f84
Showing
5 changed files
with
49 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Shell functions run on the host machine, OUTSIDE the container. | ||
# | ||
# Usage: | ||
# soil/host-shim.sh <function name> | ||
|
||
set -o nounset | ||
set -o pipefail | ||
set -o errexit | ||
|
||
docker-mount-perms() { | ||
local repo_root=$1 | ||
local dir=$repo_root/_tmp/soil | ||
mkdir -p $dir | ||
sudo chmod --verbose 777 $dir | ||
ls -l -d $dir | ||
} | ||
|
||
run-task() { | ||
local docker=$1 # docker or podman | ||
local repo_root=$2 | ||
local task=$3 # e.g. dev-minimal | ||
|
||
local image=docker.io/oilshell/soil-$task | ||
|
||
time $docker pull $image | ||
|
||
$docker run \ | ||
--mount "type=bind,source=$repo_root,target=/app/oil" \ | ||
$image \ | ||
sh -c "cd /app/oil; soil/worker.sh run-$task" | ||
} | ||
|
||
"$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters