Skip to content

Commit 8f1d4b1

Browse files
authored
CLOUDP-202471: add support to track GH Actions telemetry (#9)
1 parent 9784907 commit 8f1d4b1

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# atlas-github-action
22

3-
This is the official GitHub Action for the [MongoDB Atlas CLI](https://github.com/mongodb/mongodb-atlas-cli).
3+
This is the official GitHub Action for the [MongoDB Atlas CLI](https://github.com/mongodb/mongodb-atlas-cli), published on the [GitHub Marketplace](https://github.com/marketplace/actions/atlas-cli-github-action)
44

55
## Getting started
66

action.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,18 +122,22 @@ runs:
122122
123123
tar -C /tmp -xzf /tmp/mongodb-atlas-cli_*_linux_${ARCH}.tar.gz
124124
sudo mv /tmp/mongodb-atlas-cli_*_linux_${ARCH}/bin/atlas /usr/bin
125-
125+
126126
- name: Create Project
127127
if: ${{ inputs.create-project-name && inputs.run-setup == 'false' }}
128128
shell: bash
129129
id: create-project
130+
env:
131+
ATLAS_GITHUB_ACTION: "actions"
130132
run: |
131133
projectId=$(atlas project create "${{ inputs.create-project-name }}" -o json-path="$.id")
132134
echo "create-project-id=$(echo $projectId)" >> $GITHUB_OUTPUT
133135
134136
- name: Create Cluster
135137
if: ${{ inputs.create-cluster-name && inputs.run-setup == 'false' }}
136138
shell: bash
139+
env:
140+
ATLAS_GITHUB_ACTION: "actions"
137141
run: |
138142
CLUSTER_CONFIG="--tier ${{ inputs.tier }} --provider ${{ inputs.provider }} --region ${{ inputs.region }}"
139143
@@ -147,6 +151,8 @@ runs:
147151
- name: Delete Cluster
148152
if: ${{ inputs.delete-cluster-name && inputs.delete-project-id }}
149153
shell: bash
154+
env:
155+
ATLAS_GITHUB_ACTION: "actions"
150156
run: |
151157
atlas cluster delete ${{ inputs.delete-cluster-name }} --force --projectId ${{ inputs.delete-project-id }}
152158
if ! atlas cluster watch ${{ inputs.delete-cluster-name }} --projectId ${{ inputs.delete-project-id }} >/dev/null 2>&1; then
@@ -157,12 +163,17 @@ runs:
157163
- name: Delete Project
158164
if: ${{ inputs.delete-project-id }}
159165
shell: bash
160-
run: atlas project delete ${{ inputs.delete-project-id }} --force
166+
env:
167+
ATLAS_GITHUB_ACTION: "actions"
168+
run: |
169+
atlas project delete ${{ inputs.delete-project-id }} --force
161170
162171
- name: Setup
163172
if: ${{ inputs.run-setup == 'true' && inputs.username && inputs.password }}
164173
shell: bash
165174
id: setup
175+
env:
176+
ATLAS_GITHUB_ACTION: "actions"
166177
run: |
167178
FLAGS="--force --currentIp --skipMongosh --skipSampleData --username ${{ inputs.username }} --password ${{ inputs.password }}"
168179
CLUSTER_CONFIG="--tier ${{ inputs.tier }} --provider ${{ inputs.provider }} --region ${{ inputs.region }}"

0 commit comments

Comments
 (0)