diff --git a/action.yml b/action.yml index 31e1fd3..555f4dd 100644 --- a/action.yml +++ b/action.yml @@ -17,6 +17,9 @@ inputs: couchdb password: description: 'Password of the admin user.' required: false +outputs: + couchdb-url: + description: 'Base URL to make requests to CouchDB.' runs: using: 'docker' image: 'Dockerfile' diff --git a/entrypoint.sh b/entrypoint.sh index 1ab1d85..f3d5a9b 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -33,3 +33,6 @@ echo "Setting up CouchDB system databases..." docker exec $NAME curl -sS $CURL_CREDENTIALS 'http://127.0.0.1:5984/_users' -X PUT -H 'Content-Type: application/json' --data '{"id":"_users","name":"_users"}' > /dev/null docker exec $NAME curl -sS $CURL_CREDENTIALS 'http://127.0.0.1:5984/_global_changes' -X PUT -H 'Content-Type: application/json' --data '{"id":"_global_changes","name":"_global_changes"}' > /dev/null docker exec $NAME curl -sS $CURL_CREDENTIALS 'http://127.0.0.1:5984/_replicator' -X PUT -H 'Content-Type: application/json' --data '{"id":"_replicator","name":"_replicator"}' > /dev/null + +COUCHDB_URL="http://$INPUT_COUCHDB_PASSWORD:$INPUT_COUCHDB_PASSWORD@localhost:5984" +echo "couchdb-url=$(echo $COUCHDB_URL)" >> $GITHUB_OUTPUT