From f5bead3e04d617c4f8b678484c8ecb182304cba1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Mon, 14 Jun 2021 13:03:07 +0100 Subject: [PATCH] feat(ci): run npm audit fix daily --- .github/workflows/node-npm-audit.yml | 41 ++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/node-npm-audit.yml diff --git a/.github/workflows/node-npm-audit.yml b/.github/workflows/node-npm-audit.yml new file mode 100644 index 000000000..eee366595 --- /dev/null +++ b/.github/workflows/node-npm-audit.yml @@ -0,0 +1,41 @@ +name: Maintenance + +on: + schedule: + - cron: "0 12 * * 30" + +jobs: + npm-upgrades: + name: Run npm audit fix + runs-on: macos-latest + steps: + - name: Check out code + uses: actions/checkout@v2 + + - name: Set up Node JS + uses: actions/setup-node@v2 + with: + node-version: 14.17.0 + + - name: Regenerate package-lock.json + run: cd ui && npm audit fix + + - name: Rebuild react app + run: make -C ui build + + - name: Create Pull Request + id: cpr + uses: peter-evans/create-pull-request@v3.10.0 + with: + token: ${{ secrets.GH_REPO_TOKEN }} + author: "Ɓukasz Mierzwa " + commit-message: "chore(ui): upgrade all 3rd party dependencies" + branch: npm-upgrades + delete-branch: true + title: "chore(ui): upgrade all 3rd party dependencies" + labels: automerge + + - name: Check outputs + run: | + echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" + echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"