From 6b45119eed915e38e9414f36f5537cbca04fb2f3 Mon Sep 17 00:00:00 2001 From: achristmascarl Date: Thu, 19 Sep 2024 11:15:03 -0400 Subject: [PATCH 01/29] remove redundant chown --- Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 75a0fa8..2eb7702 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,8 +18,6 @@ RUN useradd -m -s /bin/bash rainfrog # Copy the binary from the builder image COPY --from=builder /app/target/release/rainfrog /usr/local/bin/rainfrog -# Change ownership of the files to the non-root user -RUN chown -R rainfrog:rainfrog /usr/src/app USER rainfrog HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ From 2b85274071650b60513ab8a6bb39bb60dac406f0 Mon Sep 17 00:00:00 2001 From: achristmascarl Date: Thu, 19 Sep 2024 11:16:02 -0400 Subject: [PATCH 02/29] remove redundant port, naming consistency --- Dockerfile | 2 +- README.md | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2eb7702..22f6b6a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,4 +24,4 @@ HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ CMD pidof rainfrog || exit 1 # Command to construct the full connection URL using environment variables -CMD ["bash", "-c", "rainfrog --url postgres://$username:$password@$hostname:$db_port/$dbname"] +CMD ["bash", "-c", "rainfrog --url postgres://$username:$password@$hostname:$db_port/$db_name"] diff --git a/README.md b/README.md index c132b69..aa13576 100644 --- a/README.md +++ b/README.md @@ -107,12 +107,11 @@ docker build . -t rainfrog ```sh docker run -it --rm --name rainfrog \ - -p : \ -e username="" \ -e password="" \ -e hostname="host.docker.internal" \ -e db_port="" \ - -e dbname="" rainfrog + -e db_name="" rainfrog ``` ## keybindings From c6d553ffecc34942eb08827b50e6c10d2b48a584 Mon Sep 17 00:00:00 2001 From: achristmascarl Date: Thu, 19 Sep 2024 11:25:39 -0400 Subject: [PATCH 03/29] md lint --- README.md | 61 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index aa13576..b129dea 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,8 @@ curl -LSsf https://raw.githubusercontent.com/achristmascarl/rainfrog/main/instal ## usage > [!NOTE] -> `connection_url` must include your credentials for accessing the database (ex. `postgres://username:password@localhost:5432/postgres`) +> the `connection_url` must include your credentials for accessing +> the database (ex. `postgres://username:password@localhost:5432/postgres`) ```sh rainfrog --url $(connection_url) @@ -151,35 +152,35 @@ docker run -it --rm --name rainfrog \ Keybindings may not behave exactly like Vim. The full list of active Vim keybindings in Rainfrog can be found at [vim.rs](./src/vim.rs). -| Keybinding | Description | -|---------------------------|----------------------------------------| -| `Alt+Enter`, `F5` | Execute query | -| `j`, `↓` | Move cursor down 1 line | -| `k`, `↑` | Move cursor up 1 line | -| `h`, `←` | Move cursor left 1 char | -| `l`, `→` | Move cursor right 1 char | -| `w` | Move cursor to next start of word | -| `e` | Move cursor to next end of word | -| `b` | Move cursor to previous start of word | -| `0` | Move cursor to beginning of line | -| `$` | Move cursor to end of line | -| `gg` | Jump to top of editor | -| `G` | Jump to bottom of current list | -| `Esc` | Return to normal mode | -| `i` | Enter insert (edit) mode | -| `I` | Enter insert mode at beginning of line | -| `A` | Enter insert mode at end of line | -| `o` | Insert new line below and enter insert | -| `v` | Enter visual (select) mode | -| `V` | Enter visual mode and select line | -| `r` | Begin replace operation | -| `y` | Begin yank (copy) operation | -| `x` | Begin cut operation | -| `p` | Paste from clipboard | -| `u` | Undo | -| `Ctrl+r` | Redo | -| `Ctrl+e` | Scroll down | -| `Ctrl+y` | Scroll up | +| Keybinding | Description | +| ----------------- | -------------------------------------- | +| `Alt+Enter`, `F5` | Execute query | +| `j`, `↓` | Move cursor down 1 line | +| `k`, `↑` | Move cursor up 1 line | +| `h`, `←` | Move cursor left 1 char | +| `l`, `→` | Move cursor right 1 char | +| `w` | Move cursor to next start of word | +| `e` | Move cursor to next end of word | +| `b` | Move cursor to previous start of word | +| `0` | Move cursor to beginning of line | +| `$` | Move cursor to end of line | +| `gg` | Jump to top of editor | +| `G` | Jump to bottom of current list | +| `Esc` | Return to normal mode | +| `i` | Enter insert (edit) mode | +| `I` | Enter insert mode at beginning of line | +| `A` | Enter insert mode at end of line | +| `o` | Insert new line below and enter insert | +| `v` | Enter visual (select) mode | +| `V` | Enter visual mode and select line | +| `r` | Begin replace operation | +| `y` | Begin yank (copy) operation | +| `x` | Begin cut operation | +| `p` | Paste from clipboard | +| `u` | Undo | +| `Ctrl+r` | Redo | +| `Ctrl+e` | Scroll down | +| `Ctrl+y` | Scroll up | ### query history From a11712f16d5b0948192a895b551fdce391eb3291 Mon Sep 17 00:00:00 2001 From: achristmascarl Date: Thu, 19 Sep 2024 11:31:33 -0400 Subject: [PATCH 04/29] docker test in ci --- .github/workflows/ci.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fb9ba58..15c9ca9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,6 +55,36 @@ jobs: if: ${{ matrix.target == null }} run: cargo test --features ${{ matrix.features }} --workspace + docker: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: build docker image + run: | + docker build . rainfrog_test + - name: init db for docker test + run: make db-up + - name: docker run + run: | + docker run -d --name rainfrog_test \ + -e username="root" \ + -e password="password" \ + -e hostname="host.docker.internal" \ + -e db_port="5499" \ + -e db_name="rainfrog" rainfrog_test + + sleep 5 # wait for run + - name: check container status + run: | + container_status=$(docker ps -f name=rainfrog_test --format "{{.Status}}") + if [[ "$container_status" == "Up"* ]]; then + echo "container started" + else + echo "container did not start" + exit 1 + fi + rustfmt: name: Rustfmt runs-on: ubuntu-latest From 13f050ee05233f7f59178432280eb294c7188dd0 Mon Sep 17 00:00:00 2001 From: achristmascarl Date: Thu, 19 Sep 2024 11:33:45 -0400 Subject: [PATCH 05/29] fix docker test --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 15c9ca9..9a04d3b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,13 +56,14 @@ jobs: run: cargo test --features ${{ matrix.features }} --workspace docker: + name: Test Docker runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 - name: build docker image run: | - docker build . rainfrog_test + docker build . -t rainfrog_test - name: init db for docker test run: make db-up - name: docker run From 3af70a34a3650bf20bd8126bfc0a4c820a9dbb75 Mon Sep 17 00:00:00 2001 From: achristmascarl Date: Thu, 19 Sep 2024 11:36:51 -0400 Subject: [PATCH 06/29] cleanup in docker test --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9a04d3b..72c1a87 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -85,6 +85,8 @@ jobs: echo "container did not start" exit 1 fi + - name: clean up + run: docker rm -f rainfrog_test rustfmt: name: Rustfmt From d4605b287ec920b62b154e8c349df4f1036bf689 Mon Sep 17 00:00:00 2001 From: achristmascarl Date: Thu, 19 Sep 2024 11:40:52 -0400 Subject: [PATCH 07/29] more cleanupgs --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 72c1a87..c61d368 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,7 +86,9 @@ jobs: exit 1 fi - name: clean up - run: docker rm -f rainfrog_test + run: | + docker rm -f rainfrog_test + make db-down rustfmt: name: Rustfmt From fd8abf6b758d0995d9fd2887c0b64b9a6283ccf6 Mon Sep 17 00:00:00 2001 From: achristmascarl Date: Thu, 19 Sep 2024 11:43:43 -0400 Subject: [PATCH 08/29] wait --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c61d368..2296114 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -75,7 +75,7 @@ jobs: -e db_port="5499" \ -e db_name="rainfrog" rainfrog_test - sleep 5 # wait for run + sleep 10 # wait for container - name: check container status run: | container_status=$(docker ps -f name=rainfrog_test --format "{{.Status}}") From 1bb70b3b632abbc2144c8e97c82061a4320f4e1e Mon Sep 17 00:00:00 2001 From: achristmascarl Date: Thu, 19 Sep 2024 12:22:02 -0400 Subject: [PATCH 09/29] wip --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2296114..54af24a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,6 +79,7 @@ jobs: - name: check container status run: | container_status=$(docker ps -f name=rainfrog_test --format "{{.Status}}") + echo "$container_status" if [[ "$container_status" == "Up"* ]]; then echo "container started" else From a68ea94400b80f7de7faad3478fc68a286421a5c Mon Sep 17 00:00:00 2001 From: achristmascarl Date: Thu, 19 Sep 2024 13:38:03 -0400 Subject: [PATCH 10/29] fix docker test --- .github/workflows/ci.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 54af24a..94769b4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,28 +68,24 @@ jobs: run: make db-up - name: docker run run: | - docker run -d --name rainfrog_test \ + docker run -dit --rm --name rainfrog_test \ -e username="root" \ -e password="password" \ -e hostname="host.docker.internal" \ -e db_port="5499" \ -e db_name="rainfrog" rainfrog_test - sleep 10 # wait for container + sleep 5 # wait for container - name: check container status run: | container_status=$(docker ps -f name=rainfrog_test --format "{{.Status}}") - echo "$container_status" + make db-down if [[ "$container_status" == "Up"* ]]; then echo "container started" else echo "container did not start" exit 1 fi - - name: clean up - run: | - docker rm -f rainfrog_test - make db-down rustfmt: name: Rustfmt From 9d35001ac3b280feeef30df47e986df2bc0ca316 Mon Sep 17 00:00:00 2001 From: achristmascarl Date: Thu, 19 Sep 2024 13:50:33 -0400 Subject: [PATCH 11/29] try fix --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 94769b4..7030956 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,7 +79,7 @@ jobs: - name: check container status run: | container_status=$(docker ps -f name=rainfrog_test --format "{{.Status}}") - make db-down + echo "$container_status" if [[ "$container_status" == "Up"* ]]; then echo "container started" else From e70debbd7e7f3c40680159229c01a67fe3db9527 Mon Sep 17 00:00:00 2001 From: achristmascarl Date: Thu, 19 Sep 2024 13:56:57 -0400 Subject: [PATCH 12/29] use cache for speed --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7030956..655d725 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,7 +63,9 @@ jobs: uses: actions/checkout@v4 - name: build docker image run: | - docker build . -t rainfrog_test + docker build . -t rainfrog_test \ + --cache-to type=gha \ + --cache-from type=gha - name: init db for docker test run: make db-up - name: docker run From 045163b6379ba697a9984b7ebb34c81d378b685f Mon Sep 17 00:00:00 2001 From: achristmascarl Date: Thu, 19 Sep 2024 14:32:46 -0400 Subject: [PATCH 13/29] try fixg --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 655d725..d9f9202 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,7 +67,9 @@ jobs: --cache-to type=gha \ --cache-from type=gha - name: init db for docker test - run: make db-up + run: | + make db-up + sleep 5 # wait for db container - name: docker run run: | docker run -dit --rm --name rainfrog_test \ From 797e9609923f774f5ccf36572632421dd7e94448 Mon Sep 17 00:00:00 2001 From: achristmascarl Date: Thu, 19 Sep 2024 14:42:27 -0400 Subject: [PATCH 14/29] logs --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d9f9202..eed0b27 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -82,6 +82,7 @@ jobs: sleep 5 # wait for container - name: check container status run: | + docker logs -t rainfrog_test container_status=$(docker ps -f name=rainfrog_test --format "{{.Status}}") echo "$container_status" if [[ "$container_status" == "Up"* ]]; then From 6c151238d7f83d517eb5f74412b57e8d3ccf3ee7 Mon Sep 17 00:00:00 2001 From: achristmascarl Date: Thu, 19 Sep 2024 14:43:26 -0400 Subject: [PATCH 15/29] debugging --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eed0b27..fd631e4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -82,6 +82,7 @@ jobs: sleep 5 # wait for container - name: check container status run: | + docker ps docker logs -t rainfrog_test container_status=$(docker ps -f name=rainfrog_test --format "{{.Status}}") echo "$container_status" From 3da017f0b5df828c9571f3cf07d04afd79310103 Mon Sep 17 00:00:00 2001 From: achristmascarl Date: Thu, 19 Sep 2024 14:45:09 -0400 Subject: [PATCH 16/29] caching --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fd631e4..1497df5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,7 +64,7 @@ jobs: - name: build docker image run: | docker build . -t rainfrog_test \ - --cache-to type=gha \ + --cache-to type=gha,mode=max \ --cache-from type=gha - name: init db for docker test run: | From 8023ef2fe5362cf86d4cce949454a3597f8d5601 Mon Sep 17 00:00:00 2001 From: achristmascarl Date: Thu, 19 Sep 2024 14:51:44 -0400 Subject: [PATCH 17/29] use buildx --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1497df5..64cd54c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,9 +61,11 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + - name: Set up Docker CLI + uses: docker/setup-buildx-action@v3 - name: build docker image run: | - docker build . -t rainfrog_test \ + docker buildx build . -t rainfrog_test \ --cache-to type=gha,mode=max \ --cache-from type=gha - name: init db for docker test From d1086d1935ee421bdeb17c503c42460115d9f49d Mon Sep 17 00:00:00 2001 From: achristmascarl Date: Thu, 19 Sep 2024 14:55:15 -0400 Subject: [PATCH 18/29] logs --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 64cd54c..1bd49ad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,13 +74,12 @@ jobs: sleep 5 # wait for db container - name: docker run run: | - docker run -dit --rm --name rainfrog_test \ + docker run -dit --name rainfrog_test \ -e username="root" \ -e password="password" \ -e hostname="host.docker.internal" \ -e db_port="5499" \ -e db_name="rainfrog" rainfrog_test - sleep 5 # wait for container - name: check container status run: | From 73bfc97dec8ec46e3a26e62c8fcc699ccb591a39 Mon Sep 17 00:00:00 2001 From: achristmascarl Date: Thu, 19 Sep 2024 15:02:37 -0400 Subject: [PATCH 19/29] buildx output --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1bd49ad..1aece18 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,7 +65,7 @@ jobs: uses: docker/setup-buildx-action@v3 - name: build docker image run: | - docker buildx build . -t rainfrog_test \ + docker buildx build --output type=docker . -t rainfrog_test \ --cache-to type=gha,mode=max \ --cache-from type=gha - name: init db for docker test From ffb3d8494a0df30e5af84cdffcfa2c8b2e65068e Mon Sep 17 00:00:00 2001 From: achristmascarl Date: Thu, 19 Sep 2024 15:16:52 -0400 Subject: [PATCH 20/29] try docker build action --- .github/workflows/ci.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1aece18..bdca477 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,10 +64,13 @@ jobs: - name: Set up Docker CLI uses: docker/setup-buildx-action@v3 - name: build docker image - run: | - docker buildx build --output type=docker . -t rainfrog_test \ - --cache-to type=gha,mode=max \ - --cache-from type=gha + uses: docker/build-push-action@v5 + with: + context: . + tags: rainfrog_test + outputs: type=docker + cache-from: type=gha + cache-to: type=gha,mode=max - name: init db for docker test run: | make db-up From a5a5735e9762ac028de9f4614e5be2636237344c Mon Sep 17 00:00:00 2001 From: achristmascarl Date: Thu, 19 Sep 2024 15:38:19 -0400 Subject: [PATCH 21/29] add host --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bdca477..4d7874f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -78,6 +78,7 @@ jobs: - name: docker run run: | docker run -dit --name rainfrog_test \ + --add-host host.docker.internal:host-gateway \ -e username="root" \ -e password="password" \ -e hostname="host.docker.internal" \ From d87222d1146c7e62190ea03f0a135e6798d1643c Mon Sep 17 00:00:00 2001 From: achristmascarl Date: Thu, 19 Sep 2024 15:49:34 -0400 Subject: [PATCH 22/29] remove useless caching --- .github/workflows/ci.yml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d7874f..d32e86e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,16 +61,9 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 - - name: Set up Docker CLI - uses: docker/setup-buildx-action@v3 - name: build docker image - uses: docker/build-push-action@v5 - with: - context: . - tags: rainfrog_test - outputs: type=docker - cache-from: type=gha - cache-to: type=gha,mode=max + run: | + docker build . -t rainfrog_test - name: init db for docker test run: | make db-up @@ -87,14 +80,13 @@ jobs: sleep 5 # wait for container - name: check container status run: | - docker ps - docker logs -t rainfrog_test container_status=$(docker ps -f name=rainfrog_test --format "{{.Status}}") - echo "$container_status" if [[ "$container_status" == "Up"* ]]; then echo "container started" else echo "container did not start" + echo "logs: " + docker logs -t rainfrog_test exit 1 fi From 8d980130701d8ac375b8c5893919f769e3739409 Mon Sep 17 00:00:00 2001 From: achristmascarl Date: Thu, 19 Sep 2024 15:50:43 -0400 Subject: [PATCH 23/29] update readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b129dea..03629e1 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,7 @@ docker build . -t rainfrog ```sh docker run -it --rm --name rainfrog \ + --add-host host.docker.internal:host-gateway \ # needed on linux -e username="" \ -e password="" \ -e hostname="host.docker.internal" \ From 4b27690b1067eff1adce4a8fefbf21f982755f75 Mon Sep 17 00:00:00 2001 From: achristmascarl Date: Thu, 19 Sep 2024 15:51:52 -0400 Subject: [PATCH 24/29] update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 03629e1..33eb982 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ docker build . -t rainfrog ```sh docker run -it --rm --name rainfrog \ - --add-host host.docker.internal:host-gateway \ # needed on linux + --add-host host.docker.internal:host-gateway \ -e username="" \ -e password="" \ -e hostname="host.docker.internal" \ From 40089dd2373fc9fa5ba5b468632cd86d67ba6971 Mon Sep 17 00:00:00 2001 From: achristmascarl Date: Thu, 19 Sep 2024 16:01:59 -0400 Subject: [PATCH 25/29] test dockerhub push --- .github/workflows/ci.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d32e86e..ffab548 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,6 +90,28 @@ jobs: exit 1 fi + docker-push: + name: Test Docker Push + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Set up Docker CLI + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build and push Docker images + uses: docker/build-push-action@v5 + with: + push: true + context: . + tags: achristmascarl/rainfrog:latest + cache-from: type=gha + cache-to: type=gha,mode=max` + rustfmt: name: Rustfmt runs-on: ubuntu-latest From e02503a11bb5c7b3da9ab0b3eccf5139823f90bb Mon Sep 17 00:00:00 2001 From: achristmascarl Date: Thu, 19 Sep 2024 16:16:08 -0400 Subject: [PATCH 26/29] update readme --- README.md | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 33eb982..096e744 100644 --- a/README.md +++ b/README.md @@ -99,21 +99,14 @@ rainfrog --url $(connection_url) ### `docker run` -> [!NOTE] -> For now we build the image locally until the image is available in Docker Hub - -```sh -docker build . -t rainfrog -``` - ```sh -docker run -it --rm --name rainfrog \ +docker run --platform linux/amd64 -it --rm --name rainfrog \ --add-host host.docker.internal:host-gateway \ -e username="" \ -e password="" \ -e hostname="host.docker.internal" \ -e db_port="" \ - -e db_name="" rainfrog + -e db_name="" achristmascarl/rainfrog:latest ``` ## keybindings From bc68152853eb434f07f67ca9f2e3ac4e16aba5c8 Mon Sep 17 00:00:00 2001 From: achristmascarl Date: Thu, 19 Sep 2024 16:22:10 -0400 Subject: [PATCH 27/29] update test --- .github/workflows/cd.yml | 22 ++++++++++++++++++++++ .github/workflows/ci.yml | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index ccf3aa0..d7bed08 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -130,6 +130,28 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + docker-push: + name: Docker Build and Push + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Set up Docker CLI + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build and push Docker images + uses: docker/build-push-action@v5 + with: + push: true + context: . + tags: achristmascarl/rainfrog:latest,achristmascarl/rainfrog:${{ github.ref }} + cache-from: type=gha + cache-to: type=gha,mode=max` + publish-cargo: name: Publishing to Cargo runs-on: ubuntu-latest diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ffab548..9048df5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -108,7 +108,7 @@ jobs: with: push: true context: . - tags: achristmascarl/rainfrog:latest + tags: achristmascarl/rainfrog:latest,achristmascarl/rainfrog:${{ github.ref }} cache-from: type=gha cache-to: type=gha,mode=max` From a731cfe00b0df523ced67dc8ad62114dc05477d3 Mon Sep 17 00:00:00 2001 From: achristmascarl Date: Thu, 19 Sep 2024 16:25:32 -0400 Subject: [PATCH 28/29] update test --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9048df5..208deee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -108,7 +108,7 @@ jobs: with: push: true context: . - tags: achristmascarl/rainfrog:latest,achristmascarl/rainfrog:${{ github.ref }} + tags: achristmascarl/rainfrog:latest,achristmascarl/rainfrog:v0.0.1-test cache-from: type=gha cache-to: type=gha,mode=max` From bc1e88978bf12fae8a1769a0cb6391c5e506504c Mon Sep 17 00:00:00 2001 From: achristmascarl Date: Thu, 19 Sep 2024 16:34:09 -0400 Subject: [PATCH 29/29] remove ci docker push test --- .github/workflows/ci.yml | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 208deee..d32e86e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,28 +90,6 @@ jobs: exit 1 fi - docker-push: - name: Test Docker Push - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - name: Set up Docker CLI - uses: docker/setup-buildx-action@v3 - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push Docker images - uses: docker/build-push-action@v5 - with: - push: true - context: . - tags: achristmascarl/rainfrog:latest,achristmascarl/rainfrog:v0.0.1-test - cache-from: type=gha - cache-to: type=gha,mode=max` - rustfmt: name: Rustfmt runs-on: ubuntu-latest