File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-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+ - uses : actions/checkout@v4
16+
17+ - name : Log in to registry
18+ run : echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
19+
20+ - name : Download Docker cache image (if available)
21+ run : docker pull ghcr.io/$GITHUB_REPOSITORY/build-cache || true
22+
23+ - name : Build the Docker image
24+ run : |
25+ git fetch --prune --unshallow --tags
26+ docker build . -t alephim/pyaleph-node:${GITHUB_REF##*/} -f deployment/docker-build/pyaleph.dockerfile --cache-from=ghcr.io/$GITHUB_REPOSITORY/build-cache
27+
28+ - name : Tag the image
29+ run : |
30+ docker tag alephim/pyaleph-node:${GITHUB_REF##*/} ghcr.io/$GITHUB_REPOSITORY/build-cache
31+
32+ - name : Generate keys
33+ run : |
34+ mkdir keys
35+ docker run --rm --user root --entrypoint "" -v $(pwd)/keys:/opt/pyaleph/keys alephim/pyaleph-node:${GITHUB_REF##*/} chown aleph:aleph /opt/pyaleph/keys
36+ docker run --rm --entrypoint "" -v $(pwd)/keys:/opt/pyaleph/keys alephim/pyaleph-node:${GITHUB_REF##*/} pyaleph --gen-keys --key-dir /opt/pyaleph/keys
37+
38+ - name : Ensure keys exists
39+ run : |
40+ ls keys/node-pub.key
41+ ls keys/node-secret.pkcs8.der
You can’t perform that action at this time.
0 commit comments