-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #333 from EYBlockchain/westlad/ping-pong
Westlad/ping pong
- Loading branch information
Showing
63 changed files
with
14,957 additions
and
731 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: "Publish docker app images" | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- westlad/ping-pong | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-18.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
- uses: codfish/semantic-release-action@master | ||
id: semantic | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Login to docker registry | ||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $DOCKER_ACTOR --password-stdin | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
DOCKER_ACTOR: ${{ secrets.DOCKER_ACTOR }} | ||
|
||
- run: echo ${{ steps.semantic.outputs.release-version }} | ||
|
||
- name: Docker push latest | ||
run: | | ||
docker build -t ghcr.io/eyblockchain/nightfall3-proposer . -f proposer.Dockerfile | ||
docker push ghcr.io/eyblockchain/nightfall3-proposer | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Docker push versioned | ||
if: steps.semantic.outputs.new-release-published == 'true' | ||
run: | | ||
docker build -t ghcr.io/eyblockchain/nightfall3-proposer:$RELEASE_VERSION . -f proposer.Dockerfile | ||
docker push ghcr.io/eyblockchain/nightfall3-proposer:$RELEASE_VERSION | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- run: echo ${{ steps.semantic.outputs.release-version }} | ||
|
||
- name: Docker push latest | ||
run: | | ||
docker build -t ghcr.io/eyblockchain/nightfall3-user-local . -f user-local.Dockerfile | ||
docker push ghcr.io/eyblockchain/nightfall3-user-local | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Docker push versioned | ||
if: steps.semantic.outputs.new-release-published == 'true' | ||
run: | | ||
docker build -t ghcr.io/eyblockchain/nightfall3-user-local:$RELEASE_VERSION . -f user-local.Dockerfile | ||
docker push ghcr.io/eyblockchain/nightfall3-user-local:$RELEASE_VERSION | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* eslint import/no-extraneous-dependencies: "off" */ | ||
/** | ||
utility to generate some ethereum private keys and addresses | ||
*/ | ||
import Web3 from 'web3'; | ||
import rand from './crypto-random.mjs'; | ||
|
||
const web3 = new Web3(); | ||
async function printKeys() { | ||
const privateKeys = []; | ||
for (let i = 0; i < 10; i++) { | ||
privateKeys.push(rand(32)); | ||
} | ||
const addressPromises = privateKeys.map(async pk => | ||
web3.eth.accounts.privateKeyToAccount((await pk).hex(32), false), | ||
); | ||
const addresses = await Promise.all(addressPromises); | ||
addresses.map(a => console.log('Private Key', a.privateKey, 'Address', a.address)); | ||
} | ||
|
||
printKeys(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.