-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
from node12
- Loading branch information
Showing
8 changed files
with
2,819 additions
and
203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,12 +6,18 @@ jobs: | |
runs-on: ubuntu-latest | ||
name: Test mongo-action | ||
steps: | ||
- name: Install mongosh | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y wget gnupg | ||
wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add - | ||
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list | ||
sudo apt-get update | ||
sudo apt-get install -y mongodb-mongosh | ||
- name: Create mongo Docker container | ||
id: build_mongo_docker | ||
uses: DigiPie/[email protected] | ||
uses: DigiPie/[email protected] | ||
with: | ||
image-version: latest | ||
image_version: latest | ||
port: 27017 | ||
- name: Test mongo connection | ||
id: test_mongo_connection | ||
run: "sudo mongo localhost:27017" | ||
run: "sudo mongosh localhost:27017" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
|
||
## Inputs | ||
|
||
### `image-version` | ||
### `image_version` | ||
|
||
**Optional:** The `mongo` Docker image version to use. Default: `"latest"`. Refer to the official [Dockerhub image page](https://hub.docker.com/_/mongo). | ||
|
||
|
@@ -17,22 +17,29 @@ | |
## Example usage | ||
|
||
```yaml | ||
name: mongo-action CI | ||
on: [push] | ||
|
||
jobs: | ||
test_mongo_action: | ||
runs-on: ubuntu-latest | ||
name: Test mongo-action | ||
steps: | ||
- name: Install mongosh | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y wget gnupg | ||
wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add - | ||
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list | ||
sudo apt-get update | ||
sudo apt-get install -y mongodb-mongosh | ||
- name: Create mongo Docker container | ||
id: build_mongo_docker | ||
uses: DigiPie/[email protected] | ||
uses: DigiPie/[email protected] | ||
with: | ||
image-version: latest | ||
image_version: latest | ||
port: 27017 | ||
- name: Test mongo connection | ||
id: test_mongo_connection | ||
run: "sudo mongo localhost:27017" | ||
run: "sudo mongosh localhost:27017" | ||
``` | ||
## Example usage with NodeJS-ExpressJS | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,5 +15,5 @@ inputs: | |
required: false | ||
default: 27017 | ||
runs: | ||
using: "node12" | ||
using: "node16" | ||
main: "dist/index.js" |
Oops, something went wrong.