Skip to content
Draft
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
34 changes: 34 additions & 0 deletions .github/workflows/dependabot-lockfile-cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Dependabot lockfile cleanup

on:
workflow_call:

jobs:
cleanup:
if: github.actor == 'dependabot[bot]' && github.event.action == 'opened'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/setup-node@v4
with:
node-version: 20

- name: Install dependencies
run: npm ci --ignore-scripts

- name: Clean up internal dependencies from lockfile
run: |
if ! command -v prepare-package-lock &> /dev/null; then
echo "prepare-package-lock not found, skipping"
exit 0
fi
prepare-package-lock
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git diff --quiet || (git add package-lock.json && git commit -m "chore: remove @cloudscape-design deps from lockfile" && git push)
Loading