From 708f6283b170ef7541b7523c5a519164fe183625 Mon Sep 17 00:00:00 2001 From: Marc Dumais Date: Tue, 5 Mar 2024 16:25:42 -0500 Subject: [PATCH] Add docker-example workflow Signed-off-by: Marc Dumais --- .github/workflows/docker-example.yml | 43 ++++++++++++++++++++++++++++ examples/docker/example-package.json | 1 - 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/docker-example.yml diff --git a/.github/workflows/docker-example.yml b/.github/workflows/docker-example.yml new file mode 100644 index 00000000..c7fc15ee --- /dev/null +++ b/.github/workflows/docker-example.yml @@ -0,0 +1,43 @@ +name: docker-example + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + + build-and-test: + name: Build image + runs-on: ubuntu-latest + timeout-minutes: 15 + + steps: + - uses: actions/checkout@v3 + + # - name: Build example-docker + # run: | + # cd examples/docker + # docker build -t tte . + + - name: Build example-docker + uses: nick-invision/retry@v3 + with: + timeout_minutes: 5 + retry_wait_seconds: 15 + max_attempts: 3 + retry_on: error + command: | + cd examples/docker + docker build -t tte . + on_retry_command: cd ../.. + + - name: run docker image + run: | + docker run --init -d -p 0.0.0.0:4000:4000 tte + + - name: test + run: | + wget --tries=10 --wait=30 http://localhost:4000 + cat index.html | grep "Theia-Trace Example Application" diff --git a/examples/docker/example-package.json b/examples/docker/example-package.json index d4b7baeb..27059330 100644 --- a/examples/docker/example-package.json +++ b/examples/docker/example-package.json @@ -37,7 +37,6 @@ "@theia/cli": "1.45.1" }, "scripts": { - "prepare": "theia build", "start": "theia start", "watch": "theia build --watch" },