diff --git a/.github/workflows/update-dependencies.yaml b/.github/workflows/update-dependencies.yaml new file mode 100644 index 0000000..0129c83 --- /dev/null +++ b/.github/workflows/update-dependencies.yaml @@ -0,0 +1,45 @@ +name: Update dependencies + +on: + workflow_dispatch: + +permissions: + contents: write + pull_requests: write + +jobs: + update: + name: "Update all dependencies" + + runs-on: ubuntu-22.04 + + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-node@v3 + with: + node-version: 20 + + - name: Keep npm cache around to speed up installs + uses: actions/cache@v3 + with: + path: ~/.npm + key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }} + + - name: Install dependencies + run: npm ci --no-audit --ignore-scripts + + - name: Update dependencies + run: npx npm-check-updates -u + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v5 + with: + commit-message: "fix: update dependencies" + committer: "github-actions[bot] " + author: "github-actions[bot] " + branch: update-dependencies + delete-branch: true + title: "Update dependencies" + body: "Updates the dependencies to the latest version" + labels: enhancement