diff --git a/.github/workflows/automatic-npm-check-updates.yml b/.github/workflows/automatic-npm-check-updates.yml new file mode 100644 index 0000000..7a7d72a --- /dev/null +++ b/.github/workflows/automatic-npm-check-updates.yml @@ -0,0 +1,36 @@ +name: automatic-npm-check-updates + +on: + workflow_dispatch: {} + schedule: + - cron: "0 0 * * *" + +jobs: + automatic-npm-check-updates: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@main + - uses: actions/setup-node@main + with: + node-version: "lts/*" + check-latest: true + - name: Cache node modules + uses: actions/cache@main + env: + cache-name: cache-node-modules + with: + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + - uses: fardjad/my-actions/automatic-npm-check-updates@main + with: + github-token: ${{ secrets.GH_PAT }} + post-update-commands: | + npm install + npm audit fix --quiet --no-progress --no-fund || true + npm run fix + + npm version patch --no-git-tag-version diff --git a/.github/workflows/upgrade-dependencies.yml b/.github/workflows/upgrade-dependencies.yml deleted file mode 100644 index 4e47c94..0000000 --- a/.github/workflows/upgrade-dependencies.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: upgrade-node-dependencies - -on: - workflow_dispatch: {} - schedule: - - cron: "0 0 * * *" - -jobs: - upgrade-node-dependencies: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@main - - uses: actions/setup-node@main - with: - node-version: "lts/*" - check-latest: true - - uses: fardjad/my-actions/npm-automatic-dependency-update@main - with: - github-token: ${{ secrets.GH_PAT }} - ncu-check-extra-flags: --dep prod - ncu-upgrade-extra-flags: --dep prod diff --git a/.ncurc.json b/.ncurc.json new file mode 100644 index 0000000..8252bcb --- /dev/null +++ b/.ncurc.json @@ -0,0 +1,3 @@ +{ + "dep": ["prod"] +}