Skip to content

Commit

Permalink
chore(cicd): automatic update deps (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvainmouquet authored Oct 3, 2024
1 parent 4b22ce9 commit b85b619
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 6,138 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/update-deps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Update NPM Dependencies

on:
schedule:
- cron: '0 7 * * *' # Runs every day at 7:00 AM
workflow_dispatch: # Allows manual triggering of the workflow

permissions:
contents: write
pull-requests: write

jobs:
update-deps:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install dependencies
run: make install

- name: Save check dependencies output (before)
id: check_deps_before
run: |
BEFORE=$(make check:deps) || true
echo "BEFORE=${BEFORE}"
echo "BEFORE<<EOF" >> $GITHUB_ENV
echo "$BEFORE" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Run make update
run: make update

- name: Run make check dependencies (after)
id: check_deps_after
run: |
after=$(make check:deps) || true
echo "AFTER=${AFTER}"
echo "AFTER<<EOF" >> $GITHUB_ENV
echo "$AFTER" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Create or Update Pull Request
uses: peter-evans/create-pull-request@v7
with:
title: 'chore(deps): update npm dependencies'
body: |
Automated update of package-lock.json
**Before:**
${{env.BEFORE}}
**After:**
${{env.AFTER}}
base: main
branch: update-npm-dependencies

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ merge("text-gray-100 text-gray-50")
merge(clsx("text-gray-100", "text-gray-50"))
-> "text-gray-50"

// merges multiple arguments
// merges array input
merge(['bg-blue-500', 'bg-red-500'])
-> "bg-red-500"

// merges array input
// merges multiple arguments
merge('bg-blue-500', 'bg-red-500')
-> "bg-red-500"
```
Expand Down
Loading

0 comments on commit b85b619

Please sign in to comment.