Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: move mongodb-cloud-info and fix cidrs update COMPASS-7018 #207

Merged
merged 1 commit into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/update-cidrs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Update cidrs.json

# Runs nightly and manually
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"

jobs:
update_generated_files:
name: Update automatically generated files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ^18.x
cache: 'npm'

- name: Install npm@8
run: |
npm install -g npm@8

- name: Install Dependencies
run: |
npm -v
npm i

- name: Update cidrs.json
run: npm run -w packages/mongodb-cloud-info update-cidrs

- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
commit-message: Update report
branch: ci/update-cidrs
title: 'chore: update cidrs.json'
add-paths: |
resources/cidrs.json
body: |
- Update `cidrs.json`

- name: Merge PR
env:
PULL_REQUEST_NUMBER: ${{steps.cpr.outputs.pull-request-number}}
# NOTE: we don't use a PAT so to not trigger further automation
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr merge $PULL_REQUEST_NUMBER --squash --delete-branch
Loading
Loading