-
Notifications
You must be signed in to change notification settings - Fork 1
100 lines (86 loc) · 2.78 KB
/
publish-next.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Publish NPM/Docker @next
on:
push:
branches: [ main ]
jobs:
npm-next:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '16.14.0'
registry-url: 'https://registry.npmjs.org'
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install
run: npm ci
- name: NPM Contracts Version ⬆️
working-directory: ./contracts
run: npm version --new-version "v0.0.0-${FULL_SHA:0:6}" --no-git-tag-version
env:
FULL_SHA: ${{ github.sha }}
- name: NPM Contracts Publish @next 🚂
working-directory: ./contracts
run: npm publish --tag next --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
docker-next:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: SHA Tag
run: |
export SHA_TAG="v0.0.0-${FULL_SHA:0:6}"
echo $SHA_TAG
echo "SHA_TAG=$SHA_TAG" >> $GITHUB_ENV
env:
FULL_SHA: ${{ github.sha }}
- name: Build and push dsnp/ganache:next
id: docker_build_ganache
uses: docker/build-push-action@v2
with:
push: true
file: ganache.Dockerfile
tags: |
dsnp/ganache:next
dsnp/ganache:${{ env.SHA_TAG }}
- name: Build and push dsnp/hardhat:next
id: docker_build_hardhat
uses: docker/build-push-action@v2
with:
push: true
file: hardhat.Dockerfile
tags: |
dsnp/hardhat:next
dsnp/hardhat:${{ env.SHA_TAG }}
- name: Build and push dsnp/openethereum:next
id: docker_build_openethereum
uses: docker/build-push-action@v2
with:
push: true
file: openethereum.Dockerfile
tags: |
dsnp/openethereum:next
dsnp/openethereum:${{ env.SHA_TAG }}
- name: Image digests
run: |
echo dsnp/hardhat ${{ steps.docker_build_hardhat.outputs.digest }}
echo dsnp/ganache ${{ steps.docker_build_ganache.outputs.digest }}
echo dsnp/openethereum ${{ steps.docker_build_openethereum.outputs.digest }}