From 658df39699213693da5a55188524cb2971fc0521 Mon Sep 17 00:00:00 2001 From: juliusdw Date: Tue, 30 Apr 2024 17:56:53 +0200 Subject: [PATCH 1/3] ADD: initial mongo db creation action from example --- .github/workflows/create-user-mongo-db.yml | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/create-user-mongo-db.yml diff --git a/.github/workflows/create-user-mongo-db.yml b/.github/workflows/create-user-mongo-db.yml new file mode 100644 index 0000000..0be424f --- /dev/null +++ b/.github/workflows/create-user-mongo-db.yml @@ -0,0 +1,43 @@ +name: Create User Mongo DB +on: + push: + branches: + - feat/atlas-github-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: + setup: + runs-on: ubuntu-latest + + steps: + - name: Setup AtlasCLI and create a project + id: create-project + uses: mongodb/atlas-github-action@v0.2.0 + with: + create-project-name: test-setup-project + - name: Run setup + id: setup + uses: mongodb/atlas-github-action@v0.2.0 + with: + run-setup: true + project-id: ${{ steps.create-project.outputs.create-project-id }} + cluster-name: test-cluster + username: test-user + password: test-password + - name: Retrieve Connection String + shell: bash + run: | + echo "${{ steps.setup.outputs.connection-string }}" + - name: Teardown + uses: mongodb/atlas-github-action@v0.2.0 + with: + delete-project-id: ${{ steps.create-project.outputs.create-project-id }} + delete-cluster-name: test-cluster From 9dabc7b3fe76d59a05ea51532d54e5a489610841 Mon Sep 17 00:00:00 2001 From: juliusdw Date: Tue, 30 Apr 2024 17:59:21 +0200 Subject: [PATCH 2/3] DEL: example code --- .github/workflows/create-user-mongo-db.yml | 33 ---------------------- 1 file changed, 33 deletions(-) diff --git a/.github/workflows/create-user-mongo-db.yml b/.github/workflows/create-user-mongo-db.yml index 0be424f..28c8ce4 100644 --- a/.github/workflows/create-user-mongo-db.yml +++ b/.github/workflows/create-user-mongo-db.yml @@ -8,36 +8,3 @@ on: 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: - setup: - runs-on: ubuntu-latest - - steps: - - name: Setup AtlasCLI and create a project - id: create-project - uses: mongodb/atlas-github-action@v0.2.0 - with: - create-project-name: test-setup-project - - name: Run setup - id: setup - uses: mongodb/atlas-github-action@v0.2.0 - with: - run-setup: true - project-id: ${{ steps.create-project.outputs.create-project-id }} - cluster-name: test-cluster - username: test-user - password: test-password - - name: Retrieve Connection String - shell: bash - run: | - echo "${{ steps.setup.outputs.connection-string }}" - - name: Teardown - uses: mongodb/atlas-github-action@v0.2.0 - with: - delete-project-id: ${{ steps.create-project.outputs.create-project-id }} - delete-cluster-name: test-cluster From 3c85cf575efa37ed1e36938c2000d9728a271edf Mon Sep 17 00:00:00 2001 From: juliusdw Date: Tue, 30 Apr 2024 18:14:31 +0200 Subject: [PATCH 3/3] FIX: wrong branch name --- .github/workflows/create-user-mongo-db.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/create-user-mongo-db.yml b/.github/workflows/create-user-mongo-db.yml index 28c8ce4..0d48e3a 100644 --- a/.github/workflows/create-user-mongo-db.yml +++ b/.github/workflows/create-user-mongo-db.yml @@ -2,7 +2,7 @@ name: Create User Mongo DB on: push: branches: - - feat/atlas-github-action + - feat/atlas-mongo-db-gh-action workflow_dispatch: inputs: email: