Skip to content
This repository was archived by the owner on May 22, 2023. It is now read-only.

Commit 516e37b

Browse files
authored
Merge pull request #941 from keep-network/unify-ci-workflows
Unify CI workflows
2 parents 34bad6f + 079844a commit 516e37b

5 files changed

Lines changed: 11 additions & 44 deletions

File tree

.github/workflows/contracts.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ jobs:
119119
node-version: "14.x"
120120
cache: "npm"
121121
cache-dependency-path: solidity/package-lock.json
122+
registry-url: "https://registry.npmjs.org"
122123

123124
- name: Install dependencies
124125
run: npm ci
@@ -180,9 +181,9 @@ jobs:
180181
version-tag: ${{ steps.npm-version-bump.outputs.version }}
181182

182183
- name: Publish to npm
183-
run: |
184-
echo //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} > .npmrc
185-
npm publish --access=public
184+
env:
185+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
186+
run: npm publish --access=public --tag ${{ github.event.inputs.environment }}
186187

187188
- name: Notify CI about completion of the workflow
188189
uses: keep-network/ci/actions/notify-workflow-completed@v1

.github/workflows/format.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches:
66
- main
77
pull_request:
8+
workflow_dispatch:
89

910
jobs:
1011
code-format:

.github/workflows/initcontainer.yml

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,23 +32,8 @@ jobs:
3232
- uses: actions/setup-node@v2
3333
with:
3434
node-version: "14.x"
35-
36-
# In the future we could switch to using cache functionality built-in to
37-
# the `setup-node` action. Right now the functionality does not support
38-
# cases when package.json resides outside of the root directory, but there's
39-
# an open issue (https://github.com/actions/setup-node/issues/275) in the
40-
# works for that.
41-
- name: Cache node modules
42-
uses: actions/cache@v2
43-
env:
44-
cache-name: cache-solidity-node-modules
45-
with:
46-
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
47-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
48-
restore-keys: |
49-
${{ runner.os }}-build-${{ env.cache-name }}-
50-
${{ runner.os }}-build-
51-
${{ runner.os }}-
35+
cache: "npm"
36+
cache-dependency-path: infrastructure/kube/templates/keep-ecdsa/initcontainer/provision-keep-ecdsa/package-lock.json
5237

5338
- name: Get upstream packages' versions
5439
uses: keep-network/ci/actions/upstream-builds-query@v1

.github/workflows/npm.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,10 @@ jobs:
2222
- uses: actions/setup-node@v2
2323
with:
2424
node-version: "14.x"
25+
cache: "npm"
26+
cache-dependency-path: solidity/package-lock.json
2527
registry-url: "https://registry.npmjs.org"
2628

27-
- name: Cache node modules
28-
uses: actions/cache@v1
29-
env:
30-
cache-name: cache-solidity-node-modules
31-
with:
32-
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
33-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
34-
restore-keys: |
35-
${{ runner.os }}-build-${{ env.cache-name }}-
36-
${{ runner.os }}-build-
37-
${{ runner.os }}-
38-
3929
- name: Install dependencies
4030
run: npm ci
4131

.github/workflows/staker-rewards.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,8 @@ jobs:
4242
- uses: actions/setup-node@v2
4343
with:
4444
node-version: "14.x"
45-
46-
- name: Cache node modules
47-
uses: actions/cache@v2
48-
env:
49-
cache-name: cache-solidity-node-modules
50-
with:
51-
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
52-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
53-
restore-keys: |
54-
${{ runner.os }}-build-${{ env.cache-name }}-
55-
${{ runner.os }}-build-
56-
${{ runner.os }}-
45+
cache: "npm"
46+
cache-dependency-path: staker-rewards/package-lock.json
5747

5848
- name: Install dependencies
5949
run: npm ci

0 commit comments

Comments
 (0)