From de6994facb037809261162be6564359728d8f3e7 Mon Sep 17 00:00:00 2001 From: brahimABD98 <47871510+brahimABD98@users.noreply.github.com> Date: Thu, 19 Oct 2023 13:56:26 +0100 Subject: [PATCH] Update update.yml --- .github/workflows/update.yml | 55 ++---------------------------------- 1 file changed, 2 insertions(+), 53 deletions(-) diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 1658913..14e2ece 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -1,53 +1,2 @@ -name: Weekly Dependency Update - -on: - schedule: - - cron: '0 0 * * 0' # Run every Sunday at midnight (UTC) - -jobs: - update_dependencies: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Set up Node.js - uses: actions/setup-node@v2 - with: - node-version: '14' - - - name: Install dependencies - run: npm install - - - name: Check for updates - id: check_updates - run: | - CHANGES=$(npm outdated --json) - if [ "$CHANGES" == "null" ]; then - echo "No updates found." - echo "::set-output name=update_minor::false" - else - echo "Updates found." - echo "::set-output name=update_minor::true" - fi - - - name: Update package version - if: steps.check_updates.outputs.update_minor == 'true' - run: | - git config user.email "actions@github.com" - git config user.name "GitHub Actions" - git commit -am "Bump minor version" - git push --set-upstream origin ${{ github.ref }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Update dependencies - if: steps.check_updates.outputs.update_minor == 'true' - run: npm update - - - name: Push changes - if: steps.check_updates.outputs.update_minor == 'true' - uses: ad-m/github-push-action@v0.6.0 - with: - branch: ${{ github.ref }} - github_token: ${{ secrets.GITHUB_TOKEN }} +- name: Update Node Dependencies + uses: neverendingqs/gh-action-node-update-deps@v1.7.0