From 05d4080c09ab5dec65edc3d23c13750de4ccbe28 Mon Sep 17 00:00:00 2001 From: Volodymyr Kolesnykov Date: Thu, 2 Dec 2021 03:40:55 +0200 Subject: [PATCH] Update workflows and configure renovate --- .github/dependabot.yml | 11 ----------- .github/renovate.json | 6 ++++++ .github/workflows/build.yml | 13 +++---------- .github/workflows/npm-publish.yml | 17 ++--------------- .github/workflows/push-tag.yml | 18 ++++-------------- 5 files changed, 15 insertions(+), 50 deletions(-) delete mode 100644 .github/dependabot.yml create mode 100644 .github/renovate.json diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index c1d10fe..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,11 +0,0 @@ -version: 2 -updates: - - package-ecosystem: "npm" - directory: "/" - schedule: - interval: "daily" - - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "daily" diff --git a/.github/renovate.json b/.github/renovate.json new file mode 100644 index 0000000..b074aab --- /dev/null +++ b/.github/renovate.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "local>sjinks/.github:renovate-config" + ] +} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 28cfbd5..a6334b2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,17 +25,10 @@ jobs: uses: actions/setup-node@v2.5.0 with: node-version: ${{ matrix.node }} + cache: npm - - name: Cache Node modules - uses: actions/cache@v2.1.7 - env: - cache-name: cache-node-modules - with: - path: ~/.npm - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node }}- - ${{ runner.os }}-build-${{ env.cache-name }}- + - name: Update npm + run: npm i -g npm - name: Install dependencies run: npm ci --ignore-scripts diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 99d0fb0..5c5f3e1 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -11,9 +11,6 @@ on: description: Publish to NPM? required: true -env: - NODE_VERSION: 14 - jobs: prepare: name: Prepare the source code @@ -28,18 +25,8 @@ jobs: - name: Set up Node.js environment uses: actions/setup-node@v2.5.0 with: - node-version: ${{ env.NODE_VERSION }} - - - name: Cache Node modules - uses: actions/cache@v2.1.7 - env: - cache-name: cache-node-modules - with: - path: ~/.npm - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.NODE_VERSION }}- - ${{ runner.os }}-build-${{ env.cache-name }}- + node-version: lts/* + cache: npm - name: Install dependencies run: npm ci --ignore-scripts diff --git a/.github/workflows/push-tag.yml b/.github/workflows/push-tag.yml index c7e0af4..22e0757 100644 --- a/.github/workflows/push-tag.yml +++ b/.github/workflows/push-tag.yml @@ -5,9 +5,6 @@ on: tags: - "*" -env: - NODE_VERSION: 14 - jobs: build: name: Build @@ -19,18 +16,11 @@ jobs: - name: Set up Node.js environment uses: actions/setup-node@v2.5.0 with: - node-version: ${{ env.NODE_VERSION }} + node-version: lts/* + cache: npm - - name: Cache Node modules - uses: actions/cache@v2.1.7 - env: - cache-name: cache-node-modules - with: - path: ~/.npm - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.NODE_VERSION }}- - ${{ runner.os }}-build-${{ env.cache-name }}- + - name: Update npm + run: npm i -g npm - name: Install dependencies run: npm ci --ignore-scripts