Skip to content

Commit

Permalink
fix(build): keydb image
Browse files Browse the repository at this point in the history
  • Loading branch information
hongbo-miao committed May 4, 2022
1 parent 1580aed commit 774c160
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 11 deletions.
33 changes: 28 additions & 5 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
Expand All @@ -37,6 +39,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
Expand All @@ -61,6 +65,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
Expand All @@ -85,6 +91,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
Expand All @@ -109,6 +117,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
Expand All @@ -133,6 +143,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
Expand All @@ -157,6 +169,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
Expand All @@ -181,6 +195,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
Expand All @@ -205,6 +221,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
Expand All @@ -229,6 +247,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
Expand Down Expand Up @@ -259,19 +279,20 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get redisgraph.so
working-directory: keydb
run: |
docker create --cidfile cid.txt redislabs/redisgraph:latest
docker cp $(cat cid.txt):/usr/lib/redis/modules/redisgraph.so .
docker container rm $(cat cid.txt)
rm -f cid.txt
docker create --cidfile=/tmp/cid.txt redislabs/redisgraph:latest
docker cp $(cat /tmp/cid.txt):/usr/lib/redis/modules/redisgraph.so ./keydb/modules/
docker container rm $(cat /tmp/cid.txt)
rm -f /tmp/cid.txt
- name: Build and push Docker image
id: docker_build
uses: docker/build-push-action@v2
Expand All @@ -290,6 +311,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
Expand Down
12 changes: 6 additions & 6 deletions keydb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@ keydb-cli-lua-script-load:
# KeyDB - Docker
keydb-docker-build:
cd .. && \
rm -f keydb/cid.txt && \
docker create --cidfile=keydb/cid.txt redislabs/redisgraph:latest && \
docker cp $$(cat keydb/cid.txt):/usr/lib/redis/modules/redisgraph.so ./keydb/modules/ && \
docker container rm $$(cat keydb/cid.txt) && \
rm -f keydb/cid.txt && \
docker build --file=keydb/Dockerfile --tag=ghcr.io/hongbo-miao/hm-keydb:test .
rm -f /tmp/cid.txt && \
docker create --cidfile=/tmp/cid.txt redislabs/redisgraph:latest && \
docker cp $$(cat /tmp/cid.txt):/usr/lib/redis/modules/redisgraph.so ./keydb/modules/ && \
docker container rm $$(cat /tmp/cid.txt) && \
rm -f /tmp/cid.txt && \
docker build --file=keydb/Dockerfile --tag=ghcr.io/hongbo-miao/hm-keydb:latest .
keydb-docker-push:
docker push ghcr.io/hongbo-miao/hm-keydb:latest
keydb-docker-run-multi-master:
Expand Down

0 comments on commit 774c160

Please sign in to comment.