Skip to content

.github/workflows/dependencies_update.yml #34

.github/workflows/dependencies_update.yml

.github/workflows/dependencies_update.yml #34

name: Dependencies Update πŸ€–
on:
workflow_dispatch:
schedule:
- cron: '0 0 1 * *'
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout code πŸ€–
uses: actions/checkout@v3
- name: Setup Node πŸ€–
uses: actions/setup-node@v3
with:
node-version: 18
- name: Setup pnpm πŸ€–
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false
- name: Update dependencies πŸ€–
run: pnpm dlx npm-check-updates -u --target minor"
- name: Install dependencies πŸ€–
run: pnpm install --no-frozen-lockfile
- name: Install dependencies πŸ€–
run: pnpm test:unit
- name: Check for changes πŸ€–
id: check_changes
run: |
if [[ -n "$(git status --porcelain)" ]]; then
echo "Changes found!"
echo ::set-output name=has_changes::true
else
echo "No changes found!"
echo ::set-output name=has_changes::false
fi
- name: Commit and Push changes πŸ€–
if: steps.check_changes.outputs.has_changes == 'true'
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git commit -am "chore: Dependencies Update πŸ€–"
git push