diff --git a/.github/workflows/publish-ci-docker-image.yml b/.github/workflows/publish-ci-docker-image.yml new file mode 100644 index 0000000..3cae8e7 --- /dev/null +++ b/.github/workflows/publish-ci-docker-image.yml @@ -0,0 +1,20 @@ +name: publish-ci-docker-image +on: + push: + branches: [ main ] +jobs: + publish-ci-docker-image: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build CI Docker image + run: | + docker build . -f Dockerfile.ci --tag ghcr.io/levkk/pgcat-ci:latest + docker run ghcr.io/levkk/pgcat-ci:latest + docker push ghcr.io/levkk/pgcat-ci:latest diff --git a/Dockerfile.ci b/Dockerfile.ci index d8febbb..71d3d73 100644 --- a/Dockerfile.ci +++ b/Dockerfile.ci @@ -1,10 +1,12 @@ FROM cimg/rust:1.62.0 RUN sudo apt-get update && \ - sudo apt-get install -y psmisc postgresql-contrib-12 postgresql-client-12 ruby ruby-dev libpq-dev python3 python3-pip lcov llvm-11 && \ - sudo apt-get upgrade curl -RUN cargo install cargo-binutils rustfilt && \ - rustup component add llvm-tools-preview -RUN pip3 install psycopg2 && \ - sudo gem install bundler -RUN wget -O toxiproxy-2.4.0.deb https://github.com/Shopify/toxiproxy/releases/download/v2.4.0/toxiproxy_2.4.0_linux_$(dpkg --print-architecture).deb && \ + sudo apt-get install -y \ + postgresql-contrib-12 postgresql-client-12 libpq-dev \ + ruby ruby-dev python3 python3-pip \ + lcov llvm-11 iproute2 && \ + sudo apt-get upgrade curl && \ + cargo install cargo-binutils rustfilt && \ + rustup component add llvm-tools-preview && \ + pip3 install psycopg2 && sudo gem install bundler && \ + wget -O toxiproxy-2.4.0.deb https://github.com/Shopify/toxiproxy/releases/download/v2.4.0/toxiproxy_2.4.0_linux_$(dpkg --print-architecture).deb && \ sudo dpkg -i toxiproxy-2.4.0.deb