code-server/ci/image/run.sh

14 lines
311 B
Bash
Raw Normal View History

#!/usr/bin/env bash
set -euo pipefail
main() {
cd "$(dirname "$0")/../.."
2020-02-19 02:06:18 +08:00
docker build ci/image
imageTag="$(docker build -q ci/image)"
2020-02-19 05:34:28 +08:00
docker run -t --rm -e CI -e GITHUB_TOKEN -e TRAVIS_TAG -v "$(yarn cache dir):/usr/local/share/.cache/yarn/v6" -v "$PWD:/repo" -w /repo "$imageTag" "$*"
}
main "$@"