diff --git a/.github/workflows/tests-runner-build.yaml b/.github/workflows/tests-runner-build.yaml new file mode 100644 index 0000000..a3da5b1 --- /dev/null +++ b/.github/workflows/tests-runner-build.yaml @@ -0,0 +1,32 @@ +name: Release tests-runner base image +on: + push: + branches: [main] + workflow_dispatch: + +jobs: + docs-image: + runs-on: ubuntu-latest + permissions: + packages: write + contents: read + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v3 + with: + context: . + file: tests-runner/Dockerfile + platforms: linux/amd64 + push: true + tags: | + ghcr.io/metalbear-co/ci-tests-runner-build:latest \ No newline at end of file diff --git a/tests-runner/Dockerfile b/tests-runner/Dockerfile new file mode 100644 index 0000000..0b54d0a --- /dev/null +++ b/tests-runner/Dockerfile @@ -0,0 +1,25 @@ +FROM buildpack-deps:bookworm + +WORKDIR /tests-runner + +RUN apt-get update && apt-get install -y protobuf-compiler gcc-x86-64-linux-gnu curl bison npm python3-pip bash bsdmainutils + +# required for gvm +SHELL ["/bin/bash", "-c"] +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o rustup-init.sh +RUN chmod +x rustup-init.sh +RUN ./rustup-init.sh -y -c rustfmt --default-toolchain nightly-2023-04-19 +ENV PATH="$PATH:/root/.cargo/bin" +RUN rustup target add --toolchain nightly-2023-04-19 x86_64-unknown-linux-gnu + +RUN npm install express + +RUN pip3 install --break-system-packages flask fastapi uvicorn "httptools>=0.5.0" "uvloop>=0.14.0,!=0.15.0,!=0.15.1" + +RUN curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer | bash +RUN chmod +x /root/.gvm/scripts/gvm +ENV PATH="$PATH:/root/.gvm/scripts" + +RUN gvm install go1.18 +RUN gvm install go1.19 +RUN gvm install go1.20 \ No newline at end of file