-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build Dockerfile.ci using Github workflows (#325)
We have to build and push the docker image used in CI manually. This PR builds that image automatically and pushes it to Github docker repository. Will start using that image in a follow PR
- Loading branch information
Showing
2 changed files
with
29 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |