From 7115d7882755990d906a485870c233d93ee54201 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Thu, 12 Oct 2023 16:37:54 -0400 Subject: [PATCH] WIP: CI for demo building --- .github/workflows/demo.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/demo.yml diff --git a/.github/workflows/demo.yml b/.github/workflows/demo.yml new file mode 100644 index 00000000000..c3383111fe6 --- /dev/null +++ b/.github/workflows/demo.yml @@ -0,0 +1,29 @@ +name: Demo + +on: [push, pull_request] + +defaults: + run: + shell: bash + +jobs: + build: + name: Build demo + runs-on: ubuntu-22.04 + env: + DOCKERIZE_VERSION: v0.6.1 + steps: + - uses: actions/checkout@v4 + - run: | + podman build -t demo -f securedrop/dockerfiles/focal/python3/DemoDockerfile . + - run: | + # Install dockerize + wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz + tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz + rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz + - run: | + # Start the container in the background + podman run -d -t -p 8080:8080 -p 8081:8081 --rm demo + # And wait for both ports to be up! + dockerize -wait http://127.0.0.1:8080 -timeout 2m + dockerize -wait http://127.0.0.1:8081 -timeout 2m