From 7acda07c4c1e19b1e9baa29b05ee183aa3dbe4e8 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 | 25 +++++++++++++++++++++++++ 1 file changed, 25 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..b1fe8aff1ce --- /dev/null +++ b/.github/workflows/demo.yml @@ -0,0 +1,25 @@ +name: Demo + +on: [push, pull_request] + +jobs: + build: + name: Build demo + runs-on: ubuntu-latest + container: debian:bookworm + env: + DOCKERIZE_VERSION: v0.6.1 + steps: + - run: apt-get update && apt-get install --yes git podman wget + - uses: actions/checkout@v4 + - run: | + podman build -t demo -f securedrop/dockerfiles/focal/python3/DemoDockerfile . + # 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 + # 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 30m + dockerize -wait http://127.0.0.1:8081 -timeout 30m