Skip to content

Commit

Permalink
feature/allow setting ferretdbs telemetry (#3)
Browse files Browse the repository at this point in the history
* feat: allow setting ferretdbs telemetry

* chore: bump the action version
  • Loading branch information
jkoenig134 authored Feb 15, 2023
1 parent 7073a47 commit bbe8faf
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ This GitHub Action starts a FerretDB instance and a connected PostgreSQL databas

The FerretDB version can be specified using the `ferretdb-version` input. The default version is `latest`. You can find all available FerretDB versions on [GitHub](https://github.com/FerretDB/FerretDB/releases).

The FerretDB telemetry can be enabled using the `ferretdb-telemetry` input. The default value is `disabled`. Learn more about FerretDB's telemetry [here](https://docs.ferretdb.io/telemetry/#configure-telemetry).

## Usage

```yaml
Expand All @@ -27,7 +29,7 @@ jobs:
node-version: 18

- name: Start FerretDB
uses: js-soft/[email protected].1
uses: js-soft/[email protected].2
with:
ferretdb-version: 0.8.1

Expand Down
6 changes: 6 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,15 @@ inputs:
required: false
default: "27017"

ferretdb-telemetry:
description: 'Configure FerretDB telemetry (default "disabled")'
required: false
default: "disabled"

runs:
using: "docker"
image: "Dockerfile"
args:
- ${{ inputs.ferretdb-version }}
- ${{ inputs.ferretdb-port }}
- ${{ inputs.ferretdb-telemetry }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@js-soft/ferretdb-github-action",
"version": "1.0.1",
"version": "1.0.2",
"description": "FerretDB GitHub Action",
"keywords": [
"github",
Expand Down
4 changes: 3 additions & 1 deletion start-ferretdb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

FERRETDB_VERSION=$1
FERRETDB_PORT=$2
FERRETDB_TELEMETRY=$3

echo "Starting FerretDB version ${FERRETDB_VERSION} on port ${FERRETDB_PORT}"

Expand All @@ -16,7 +17,8 @@ docker run --network ferretdb --name postgres \
docker run --network ferretdb --name ferretdb \
-p $FERRETDB_PORT:27017 \
-e FERRETDB_POSTGRESQL_URL=postgres://username:password@postgres:5432/ferretdb?pool_max_conns=40 \
-d ghcr.io/ferretdb/ferretdb:${FERRETDB_VERSION}
-e FERRETDB_TELEMETRY=$FERRETDB_TELEMETRY \
-d ghcr.io/ferretdb/ferretdb:$FERRETDB_VERSION

if [ $? -ne 0 ]; then
echo "Error starting FerretDB Docker container"
Expand Down

0 comments on commit bbe8faf

Please sign in to comment.