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" },