Skip to content

DEL: teardown step

DEL: teardown step #6

name: Create User Mongo DB
on:
push:
branches:
- feat/atlas-mongo-db-gh-action
workflow_dispatch:
inputs:
email:
description: where to send the email
required: true
env:
MONGODB_ATLAS_PUBLIC_API_KEY: ${{ secrets.PUBLIC_API_KEY }}
MONGODB_ATLAS_PRIVATE_API_KEY: ${{ secrets.PRIVATE_API_KEY }}
MONGODB_ATLAS_ORG_ID: '6630fe6c4a18910569ad5e79'
jobs:
gen-data:
runs-on: ubuntu-latest
steps:
- id: 'generate-db-id'
name: 'generate db id'
uses: 'yakubique/[email protected]'
with:
min: 111111
max: 999999
- id: 'generate-db-pw'
uses: aammirmirza/[email protected]
with:
length: 15
setup:
runs-on: ubuntu-latest
steps:
- name: Setup AtlasCLI and create a project
id: create-project
uses: mongodb/[email protected]
with:
create-project-name: ${{ steps.generate-db-id.outputs.number }}
- name: Run setup
id: setup
uses: mongodb/[email protected]
with:
run-setup: true
project-id: ${{ steps.generate-db-id.outputs.number }}
cluster-name: ${{ steps.generate-db-id.outputs.number }}
username: ${{ steps.generate-db-id.outputs.number }}
password: ${{ steps.generate-db-pw.outputs.password }}
- name: Retrieve Connection String
shell: bash
run: |
echo "${{ steps.setup.outputs.connection-string }}"