-
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.
- Loading branch information
Showing
9 changed files
with
478 additions
and
46 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 |
---|---|---|
@@ -1,15 +1,17 @@ | ||
name: mongo-action CI | ||
on: [push] | ||
|
||
jobs: | ||
hello_world_job: | ||
test_mongo_action: | ||
runs-on: ubuntu-latest | ||
name: A job to say hello | ||
name: Test mongo-action | ||
steps: | ||
- name: Hello world action step | ||
id: hello | ||
uses: actions/hello-world-docker-action@v1 | ||
with: | ||
who-to-greet: 'Mona the Octocat' | ||
# Use the output from the `hello` step | ||
- name: Get the output time | ||
run: echo "The time was ${{ steps.hello.outputs.time }}" | ||
- name: Create mongo Docker container | ||
id: build_mongo_docker | ||
uses: DigiPie/[email protected] | ||
- name: Install mongodb-clients | ||
id: install_mongodb_clients | ||
run: sudo apt install mongodb-clients | ||
- name: Test mongo connection | ||
id: test_mongo_connection | ||
run: "sudo mongo 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules/ |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,20 +1,36 @@ | ||
# mongo-action | ||
Github action to create a Docker container from the official mongo image. Useful for testing purposes. | ||
|
||
## Inputs | ||
![mongo-action CI](https://github.com/DigiPie/mongo-action/workflows/mongo-action%20CI/badge.svg) | ||
|
||
Github action to create a Docker container from the official mongo image. Useful for testing purposes. The MongoDB instance's port will be exposed to host and other containers. | ||
|
||
### `who-to-greet` | ||
## Inputs | ||
|
||
**Required** The name of the person to greet. Default `"World"`. | ||
### `image-version` | ||
|
||
## Outputs | ||
**Optional:** The `mongo` Docker image version to use. Default: `"latest"`. | ||
|
||
### `time` | ||
### `port` | ||
|
||
The time we greeted you. | ||
**Optional:** The `mongo` port to use. Default: `27017`. | ||
|
||
## Example usage | ||
|
||
uses: actions/hello-world-docker-action@v1 | ||
with: | ||
who-to-greet: 'Mona the Octocat' | ||
```yaml | ||
on: [push] | ||
|
||
jobs: | ||
test_mongo_action: | ||
runs-on: ubuntu-latest | ||
name: Test mongo-action | ||
steps: | ||
- name: Create mongo Docker container | ||
id: build_mongo_docker | ||
uses: DigiPie/[email protected] | ||
- name: Install mongodb-clients | ||
id: install_mongodb_clients | ||
run: sudo apt install mongodb-clients | ||
- name: Test mongo connection | ||
id: test_mongo_connection | ||
run: "sudo mongo 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
# action.yml | ||
name: 'Hello World' | ||
description: 'Greet someone and record the time' | ||
name: "mongo-action" | ||
author: "Evan Tay" | ||
description: "Github action to create a Docker container from the official mongo image." | ||
branding: | ||
icon: "database" | ||
color: "green" | ||
inputs: | ||
who-to-greet: # id of input | ||
description: 'Who to greet' | ||
required: true | ||
default: 'World' | ||
outputs: | ||
time: # id of output | ||
description: 'The time we greeted you' | ||
image_version: | ||
description: "The mongo Docker image version to use" | ||
required: false | ||
default: "latest" | ||
port: | ||
description: "The MongoDB port to use" | ||
required: false | ||
default: 27017 | ||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' | ||
args: | ||
- ${{ inputs.who-to-greet }} | ||
using: "node12" | ||
main: "dist/index.js" |
Oops, something went wrong.