Skip to content
Closed
Show file tree
Hide file tree
Changes from 5 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
54 changes: 54 additions & 0 deletions .github/workflows/update-leafygreen-packages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Update leafygreen packages
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this whole file is a copy of update-electron with lg changes


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

jobs:
update_generated_files:
name: Update Leafygreen
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# don't checkout a detatched HEAD
ref: ${{ github.head_ref }}

# this is important so git log can pick up on
# the whole history to generate the list of AUTHORS
fetch-depth: '0'

- name: Setup git
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- uses: actions/setup-node@v3
with:
node-version: 20.16.0
cache: 'npm'

- name: Install [email protected]
run: |
npm install -g [email protected]
- name: Install Dependencies
run: |
npm -v
npm ci
- name: Bump packages
run: |
npm add $(cat packages/compass-components/package.json | jq -r '.dependencies | keys[]' | grep "@leafygreen-ui" | sed s/$/@latest/ | xargs) --workspace=@mongodb-js/compass-components
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now i am thinking about jq - would it be available on CI 🤔 ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

git add .
git commit --no-allow-empty -m "chore(deps): update leafygreen packages" || true
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.SVC_DEVTOOLSBOT_TOKEN }}
commit-message: 'chore(deps): update leafygreen packages'
branch: ci/update-leafygreen
title: 'chore(deps): update leafygreen packages'
labels: no-title-validation
body: |
- Update leafygreen
Loading
Loading