I’m trying to develop a script that will use MongoDB Atlas CLI to do an automatic point-in-time recovery operation if db migrations fail.
I intend to run this on Github actions. My question is therefore, how do I install the Atlas CLI on Github actions?
Based on this page, the recommended way might be to follow the guidelines for ubuntu there, so something like this?
name: Install MongoDB Atlas CLI
on: [push]
jobs:
install-cli:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install MongoDB Atlas CLI
run: |
sudo apt-get install gnupg
wget -qO - https://pgp.mongodb.com/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-atlas-cli
atlas --version
Thanks in advance