Skip to content

Commit

Permalink
Merge pull request #4 from moy2010/initial-release-fix-examples
Browse files Browse the repository at this point in the history
Fix examples and make API key optional
  • Loading branch information
moy2010 committed Mar 5, 2022
2 parents d308057 + 13bef46 commit 71103a0
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 0.1.2

* Make API key optional
* Fix usage of meilisearch version in examples

# 0.1.1

* Fix order or docker params
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Start Meilisearch
uses: moy2010/meilisearch-github-action@0.1
with:
meilisearch-version: 25.2
meilisearch-version: v0.25.2

- run: npm install

Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
- name: Start Meilisearch
uses: moy2010/meilisearch-github-action@0.1
with:
meilisearch-version: 25.2
meilisearch-version: v0.25.2
meilisearch-port: 42069

- name: Install dependencies
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
- name: Start Meilisearch
uses: moy2010/meilisearch-github-action@0.1
with:
meilisearch-version: 25.2
meilisearch-version: v0.25.2
meilisearch-port: 42069
meilisearch-api-key: test-api-key

Expand Down
14 changes: 13 additions & 1 deletion start-meilisearch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,23 @@ MEILISEARCH_VERSION=$1
MEILISEARCH_PORT=$2
MEILISEARCH_API_KEY=$3

if [ -z "$MEILISEARCH_API_KEY" ]; then
echo "::group::Starting Meilisearch server"
echo " - port [$MEILISEARCH_PORT]"
echo " - version [$MEILISEARCH_VERSION]"
echo ""

docker run --name meilisearch --publish $MEILISEARCH_PORT:$MEILISEARCH_PORT --detach --volume "$(pwd)/data.ms:/data.ms" getmeili/meilisearch:$MEILISEARCH_VERSION
echo "::endgroup::"

return
fi

echo "::group::Starting Meilisearch server"
echo " - port [$MEILISEARCH_PORT]"
echo " - version [$MEILISEARCH_VERSION]"
echo " - api key [$MEILISEARCH_API_KEY]"
echo ""

docker run --name meilisearch --publish $MEILISEARCH_PORT:$MEILISEARCH_PORT -e MEILI_MASTER_KEY=$MEILISEARCH_API_KEY --detach --volume "$(pwd)/data.ms:/data.ms" getmeili/meilisearch:$MEILISEARCH_VERSION
docker run --name meilisearch --publish $MEILISEARCH_PORT:$MEILISEARCH_PORT -e MEILI_MASTER_KEY="$MEILISEARCH_API_KEY" --detach --volume "$(pwd)/data.ms:/data.ms" getmeili/meilisearch:$MEILISEARCH_VERSION
echo "::endgroup::"

0 comments on commit 71103a0

Please sign in to comment.