Skip to content
Merged
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
28 changes: 20 additions & 8 deletions .github/workflows/update-dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,31 @@ permissions:
contents: none # We use the github app token to push the changes

jobs:
configure_matrix:
name: Configure matrix
runs-on: ubuntu-latest
outputs:
group_name: ${{ steps.define_groups.outputs.group_name }}
steps:
- id: define_groups
name: Define groups to update
env:
SHOULD_INCLUDE_ALL_GROUPS: ${{ inputs.group_name == '' || inputs.group_name == 'all' }}
run: |
echo "Configuring matrix (inputs.group_name=${{ inputs.group_name }})"
if [[ "$SHOULD_INCLUDE_ALL_GROUPS" = "true" ]]; then
# When adding new group, don't forget to update the `workflow_dispatch`
echo 'group_name=["electron","eslint","typescript","mongosh"]' >> "$GITHUB_OUTPUT"
else
echo 'group_name=["${{ inputs.group_name }}"]' >> "$GITHUB_OUTPUT"
fi
update_dependencies_group:
name: Update ${{ matrix.group_name }} to latest
runs-on: ubuntu-latest
needs: configure_matrix
strategy:
matrix:
group_name:
# When adding new group, don't forget to update the
# `workflow_dispatch.inputs`
- electron
- eslint
- typescript
- mongosh
if: ${{ inputs.group_name == '' || inputs.group_name == 'all' || inputs.group_name == matrix.group_name }}
group_name: ${{ fromJSON(needs.configure_matrix.outputs.group_name) }}
steps:
- name: Create Github App Token
uses: mongodb-js/devtools-shared/actions/setup-bot-token@main
Expand Down
Loading