File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Test keys generation
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ branches :
9+ - " *"
10+
11+ jobs :
12+ generate-keys :
13+ runs-on : ubuntu-22.04
14+ steps :
15+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
16+ - uses : actions/checkout@v2
17+
18+ - name : Log in to registry
19+ run : echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
20+
21+ - name : Download Docker cache image (if available)
22+ run : docker pull ghcr.io/$GITHUB_REPOSITORY/build-cache || true
23+
24+ - name : Build the Docker image
25+ run : |
26+ git fetch --prune --unshallow --tags
27+ docker build . -t alephim/pyaleph-node:${GITHUB_REF##*/} -f deployment/docker-build/pyaleph.dockerfile --cache-from=ghcr.io/$GITHUB_REPOSITORY/build-cache
28+
29+ - name : Tag the image
30+ run : |
31+ docker tag alephim/pyaleph-node:${GITHUB_REF##*/} ghcr.io/$GITHUB_REPOSITORY/build-cache
32+
33+ - name : Generate keys
34+ run : |
35+ mkdir keys
36+ docker run --rm --user root --entrypoint "" -v $(pwd)/keys:/opt/pyaleph/keys alephim/pyaleph-node:${GITHUB_REF##*/} chown aleph:aleph /opt/pyaleph/keys
37+ docker run --rm --entrypoint "" -v $(pwd)/keys:/opt/pyaleph/keys alephim/pyaleph-node:${GITHUB_REF##*/} pyaleph --gen-keys --key-dir /opt/pyaleph/keys
38+
39+ - name : Ensure keys exists
40+ run : |
41+ ls keys/node-pub.key
42+ ls keys/node-secret.pkcs8.der
You can’t perform that action at this time.
0 commit comments