From 794c7eaf126a608ccea3238083cca17048a24ca8 Mon Sep 17 00:00:00 2001 From: Dustin Brickwood Date: Wed, 1 Jun 2022 15:17:20 -0500 Subject: [PATCH 01/13] chore: update workflow --- .github/publish-docker.yml | 95 ++++++++++++++++++++++++++++++++++++ docker/Parachain.Dockerfile | 12 ++--- docker/Standalone.Dockerfile | 42 ++++++++++++++++ 3 files changed, 143 insertions(+), 6 deletions(-) create mode 100644 .github/publish-docker.yml create mode 100644 docker/Standalone.Dockerfile diff --git a/.github/publish-docker.yml b/.github/publish-docker.yml new file mode 100644 index 000000000..83f4e8b26 --- /dev/null +++ b/.github/publish-docker.yml @@ -0,0 +1,95 @@ +name: Docker + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +on: + schedule: + - cron: '26 16 * * *' + push: + branches: [ main ] + # Publish semver tags as releases. + tags: [ 'v*.*.*' ] + pull_request: + branches: [ main ] + +env: + # Use docker.io for Docker Hub if empty + REGISTRY: ghcr.io + # github.repository as / + IMAGE_NAME: ${{ github.repository }}/egg-standalone-node + + +jobs: + build: + + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + # This is used to complete the identity challenge + # with sigstore/fulcio when running outside of PRs. + id-token: write + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # Install the cosign tool except on PR + # https://github.com/sigstore/cosign-installer + - name: Install cosign + if: github.event_name != 'pull_request' + uses: sigstore/cosign-installer@d6a3abf1bdea83574e28d40543793018b6035605 + with: + cosign-release: 'v1.7.1' + + + # Workaround: https://github.com/docker/build-push-action/issues/461 + - name: Setup Docker buildx + uses: docker/setup-buildx-action@v2 + + # Login against a Docker registry except on PR + # https://github.com/docker/login-action + - name: Log into registry ${{ env.REGISTRY }} + if: github.event_name != 'pull_request' + uses: docker/login-action@v2 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + # Extract metadata (tags, labels) for Docker + # https://github.com/docker/metadata-action + - name: Extract Docker metadata + id: meta + uses: docker/metadata-action@v4 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + # Build and push Docker image with Buildx (don't push on PR) + # https://github.com/docker/build-push-action + - name: Build and push Docker image + id: build-and-push + uses: docker/build-push-action@v3 + with: + context: . + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=registry,ref=${{ steps.meta.outputs.tags }} + cache-to: type=inline + + # Sign the resulting Docker image digest except on PRs. + # This will only write to the public Rekor transparency log when the Docker + # repository is public to avoid leaking data. If you would like to publish + # transparency data even for private images, pass --force to cosign below. + # https://github.com/sigstore/cosign + - name: Sign the published Docker image + if: ${{ github.event_name != 'pull_request' }} + env: + COSIGN_EXPERIMENTAL: "true" + # This step uses the identity token to provision an ephemeral certificate + # against the sigstore community Fulcio instance. + run: cosign sign ${{ steps.meta.outputs.tags }}@${{ steps.build-and-push.outputs.digest }} diff --git a/docker/Parachain.Dockerfile b/docker/Parachain.Dockerfile index faf2ea2e3..a9e1bff3e 100644 --- a/docker/Parachain.Dockerfile +++ b/docker/Parachain.Dockerfile @@ -1,5 +1,5 @@ FROM rust:buster as builder -WORKDIR /app +WORKDIR /network RUN rustup default nightly-2021-11-07 && \ rustup target add wasm32-unknown-unknown --toolchain nightly-2021-11-07 @@ -13,7 +13,7 @@ ARG BUILD_ARGS COPY . . # Build DKG Parachain Node -RUN cargo build --release -p dkg-node +RUN cargo build --release --locked -p egg-collator # ============= @@ -21,11 +21,11 @@ FROM phusion/baseimage:bionic-1.0.0 RUN useradd -m -u 1000 -U -s /bin/sh -d /dkg dkg -COPY --from=builder /app/target/release/dkg-node /usr/local/bin +COPY --from=builder /network/target/release/egg-collator /usr/local/bin # checks -RUN ldd /usr/local/bin/dkg-node && \ - /usr/local/bin/dkg-node --version +RUN ldd /usr/local/bin/egg-collator && \ + /usr/local/bin/egg-collator --version # Shrinking RUN rm -rf /usr/lib/python* && \ @@ -39,4 +39,4 @@ RUN chown -R dkg:dkg /dkg/data VOLUME ["/dkg/data"] -ENTRYPOINT [ "/usr/local/bin/dkg-node" ] \ No newline at end of file +ENTRYPOINT [ "/usr/local/bin/egg-collator" ] \ No newline at end of file diff --git a/docker/Standalone.Dockerfile b/docker/Standalone.Dockerfile new file mode 100644 index 000000000..905bae36a --- /dev/null +++ b/docker/Standalone.Dockerfile @@ -0,0 +1,42 @@ +FROM rust:buster as builder +WORKDIR /network + +RUN rustup default nightly-2021-11-07 && \ + rustup target add wasm32-unknown-unknown --toolchain nightly-2021-11-07 + +# Install Required Packages +RUN apt-get update && apt-get install -y git clang curl libssl-dev llvm libudev-dev libgmp3-dev && rm -rf /var/lib/apt/lists/* + +ARG GIT_COMMIT= +ENV GIT_COMMIT=$GIT_COMMIT +ARG BUILD_ARGS + +COPY . . +# Build DKG Parachain Node +RUN cargo build --release --locked -p egg-standalone-node + +# ============= + +FROM phusion/baseimage:bionic-1.0.0 + +RUN useradd -m -u 1000 -U -s /bin/sh -d /dkg dkg + +COPY --from=builder /network/target/release/dkg-node /usr/local/bin + +# checks +RUN ldd /usr/local/bin/egg-standalone-node && \ + /usr/local/bin/egg-standalone-node --version + +# Shrinking +RUN rm -rf /usr/lib/python* && \ + rm -rf /usr/bin /usr/sbin /usr/share/man + +USER dkg +EXPOSE 30333 9933 9944 9615 + +RUN mkdir /dkg/data +RUN chown -R dkg:dkg /dkg/data + +VOLUME ["/dkg/data"] + +ENTRYPOINT [ "/usr/local/bin/egg-standalone-node" ] \ No newline at end of file From 046dd22d6b56510a75a95712b945272bdd00ef9b Mon Sep 17 00:00:00 2001 From: Dustin Brickwood Date: Wed, 1 Jun 2022 15:19:51 -0500 Subject: [PATCH 02/13] chore: update workflow --- .github/workflows/publish-docker.yml | 95 ++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 .github/workflows/publish-docker.yml diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml new file mode 100644 index 000000000..83f4e8b26 --- /dev/null +++ b/.github/workflows/publish-docker.yml @@ -0,0 +1,95 @@ +name: Docker + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +on: + schedule: + - cron: '26 16 * * *' + push: + branches: [ main ] + # Publish semver tags as releases. + tags: [ 'v*.*.*' ] + pull_request: + branches: [ main ] + +env: + # Use docker.io for Docker Hub if empty + REGISTRY: ghcr.io + # github.repository as / + IMAGE_NAME: ${{ github.repository }}/egg-standalone-node + + +jobs: + build: + + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + # This is used to complete the identity challenge + # with sigstore/fulcio when running outside of PRs. + id-token: write + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # Install the cosign tool except on PR + # https://github.com/sigstore/cosign-installer + - name: Install cosign + if: github.event_name != 'pull_request' + uses: sigstore/cosign-installer@d6a3abf1bdea83574e28d40543793018b6035605 + with: + cosign-release: 'v1.7.1' + + + # Workaround: https://github.com/docker/build-push-action/issues/461 + - name: Setup Docker buildx + uses: docker/setup-buildx-action@v2 + + # Login against a Docker registry except on PR + # https://github.com/docker/login-action + - name: Log into registry ${{ env.REGISTRY }} + if: github.event_name != 'pull_request' + uses: docker/login-action@v2 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + # Extract metadata (tags, labels) for Docker + # https://github.com/docker/metadata-action + - name: Extract Docker metadata + id: meta + uses: docker/metadata-action@v4 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + # Build and push Docker image with Buildx (don't push on PR) + # https://github.com/docker/build-push-action + - name: Build and push Docker image + id: build-and-push + uses: docker/build-push-action@v3 + with: + context: . + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=registry,ref=${{ steps.meta.outputs.tags }} + cache-to: type=inline + + # Sign the resulting Docker image digest except on PRs. + # This will only write to the public Rekor transparency log when the Docker + # repository is public to avoid leaking data. If you would like to publish + # transparency data even for private images, pass --force to cosign below. + # https://github.com/sigstore/cosign + - name: Sign the published Docker image + if: ${{ github.event_name != 'pull_request' }} + env: + COSIGN_EXPERIMENTAL: "true" + # This step uses the identity token to provision an ephemeral certificate + # against the sigstore community Fulcio instance. + run: cosign sign ${{ steps.meta.outputs.tags }}@${{ steps.build-and-push.outputs.digest }} From 262eb1886cf986ea97302bed8ebb94103ef71e14 Mon Sep 17 00:00:00 2001 From: Dustin Brickwood Date: Wed, 1 Jun 2022 15:22:02 -0500 Subject: [PATCH 03/13] chore: fix file path --- .github/publish-docker.yml | 95 ---------------------------- .github/workflows/publish-docker.yml | 2 +- 2 files changed, 1 insertion(+), 96 deletions(-) delete mode 100644 .github/publish-docker.yml diff --git a/.github/publish-docker.yml b/.github/publish-docker.yml deleted file mode 100644 index 83f4e8b26..000000000 --- a/.github/publish-docker.yml +++ /dev/null @@ -1,95 +0,0 @@ -name: Docker - -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - -on: - schedule: - - cron: '26 16 * * *' - push: - branches: [ main ] - # Publish semver tags as releases. - tags: [ 'v*.*.*' ] - pull_request: - branches: [ main ] - -env: - # Use docker.io for Docker Hub if empty - REGISTRY: ghcr.io - # github.repository as / - IMAGE_NAME: ${{ github.repository }}/egg-standalone-node - - -jobs: - build: - - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - # This is used to complete the identity challenge - # with sigstore/fulcio when running outside of PRs. - id-token: write - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - # Install the cosign tool except on PR - # https://github.com/sigstore/cosign-installer - - name: Install cosign - if: github.event_name != 'pull_request' - uses: sigstore/cosign-installer@d6a3abf1bdea83574e28d40543793018b6035605 - with: - cosign-release: 'v1.7.1' - - - # Workaround: https://github.com/docker/build-push-action/issues/461 - - name: Setup Docker buildx - uses: docker/setup-buildx-action@v2 - - # Login against a Docker registry except on PR - # https://github.com/docker/login-action - - name: Log into registry ${{ env.REGISTRY }} - if: github.event_name != 'pull_request' - uses: docker/login-action@v2 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - # Extract metadata (tags, labels) for Docker - # https://github.com/docker/metadata-action - - name: Extract Docker metadata - id: meta - uses: docker/metadata-action@v4 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - - # Build and push Docker image with Buildx (don't push on PR) - # https://github.com/docker/build-push-action - - name: Build and push Docker image - id: build-and-push - uses: docker/build-push-action@v3 - with: - context: . - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=registry,ref=${{ steps.meta.outputs.tags }} - cache-to: type=inline - - # Sign the resulting Docker image digest except on PRs. - # This will only write to the public Rekor transparency log when the Docker - # repository is public to avoid leaking data. If you would like to publish - # transparency data even for private images, pass --force to cosign below. - # https://github.com/sigstore/cosign - - name: Sign the published Docker image - if: ${{ github.event_name != 'pull_request' }} - env: - COSIGN_EXPERIMENTAL: "true" - # This step uses the identity token to provision an ephemeral certificate - # against the sigstore community Fulcio instance. - run: cosign sign ${{ steps.meta.outputs.tags }}@${{ steps.build-and-push.outputs.digest }} diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index 83f4e8b26..43b3f3622 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -74,7 +74,7 @@ jobs: id: build-and-push uses: docker/build-push-action@v3 with: - context: . + context: ./docker/Standalone.Dockerfile push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From df2f6e2e73554491f87e897780f170e8f11b6cef Mon Sep 17 00:00:00 2001 From: Dustin Brickwood Date: Wed, 1 Jun 2022 15:28:38 -0500 Subject: [PATCH 04/13] chore: fix file path --- .github/workflows/publish-docker.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index 43b3f3622..80d914fe1 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -74,7 +74,8 @@ jobs: id: build-and-push uses: docker/build-push-action@v3 with: - context: ./docker/Standalone.Dockerfile + context: . + file: ./docker/Standalone.Dockerfile push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From 61648e7f356fa770553f6ac3fa736ce314dd133b Mon Sep 17 00:00:00 2001 From: Dustin Brickwood Date: Wed, 1 Jun 2022 15:55:57 -0500 Subject: [PATCH 05/13] chore: add cancel job action and multiple docker images --- .github/workflows/publish-docker.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index 80d914fe1..f94042760 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -19,13 +19,22 @@ env: # Use docker.io for Docker Hub if empty REGISTRY: ghcr.io # github.repository as / - IMAGE_NAME: ${{ github.repository }}/egg-standalone-node + IMAGE_NAME_1: ${{ github.repository }}/egg-standalone-node + IMAGE_NAME_2: ${{ github.repository }}/egg-collator jobs: build: runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - dockerfile: ./docker/Standalone.Dockerfile + image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_1 }} + - dockerfile: ./docker/Parachain.Dockerfile + image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_2 }} permissions: contents: read packages: write @@ -34,6 +43,11 @@ jobs: id-token: write steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.9.1 + with: + access_token: ${{ github.token }} + - name: Checkout repository uses: actions/checkout@v3 @@ -66,7 +80,7 @@ jobs: id: meta uses: docker/metadata-action@v4 with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + images: ${{ matrix.image }} # Build and push Docker image with Buildx (don't push on PR) # https://github.com/docker/build-push-action From 8f7690550a7c2b45db2f6203cd0c49929308295f Mon Sep 17 00:00:00 2001 From: Dustin Brickwood Date: Wed, 1 Jun 2022 16:02:35 -0500 Subject: [PATCH 06/13] chore: add cancel job action and multiple docker images --- .github/workflows/publish-docker.yml | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index f94042760..bd683841d 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -1,28 +1,19 @@ name: Docker -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - on: schedule: - cron: '26 16 * * *' push: branches: [ main ] - # Publish semver tags as releases. tags: [ 'v*.*.*' ] pull_request: branches: [ main ] env: - # Use docker.io for Docker Hub if empty REGISTRY: ghcr.io - # github.repository as / IMAGE_NAME_1: ${{ github.repository }}/egg-standalone-node IMAGE_NAME_2: ${{ github.repository }}/egg-collator - jobs: build: @@ -43,13 +34,13 @@ jobs: id-token: write steps: + - name: Cancel Previous Runs uses: styfle/cancel-workflow-action@0.9.1 with: access_token: ${{ github.token }} - - - name: Checkout repository - uses: actions/checkout@v3 + + - uses: actions/checkout@v3 # Install the cosign tool except on PR # https://github.com/sigstore/cosign-installer From 995a0db0bf2b19b354f5095d8af5a068dcdfc275 Mon Sep 17 00:00:00 2001 From: Dustin Brickwood Date: Wed, 1 Jun 2022 16:05:22 -0500 Subject: [PATCH 07/13] remove comments --- .github/workflows/publish-docker.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index bd683841d..731c0db46 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -9,6 +9,8 @@ on: pull_request: branches: [ main ] + workflow_dispatch: + env: REGISTRY: ghcr.io IMAGE_NAME_1: ${{ github.repository }}/egg-standalone-node From 13c47d87fb85be4a54378f0a3e32735b8a1ccbb4 Mon Sep 17 00:00:00 2001 From: Dustin Brickwood Date: Wed, 1 Jun 2022 16:07:26 -0500 Subject: [PATCH 08/13] fix: .env issue --- .github/workflows/publish-docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index 731c0db46..a6bcdb5dd 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -25,7 +25,7 @@ jobs: matrix: include: - dockerfile: ./docker/Standalone.Dockerfile - image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_1 }} + image: ghcr.io/${{ env.IMAGE_NAME_1 }} - dockerfile: ./docker/Parachain.Dockerfile image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_2 }} permissions: From 72d2d50bba11eb85dd4f71fa048452e0999a0a63 Mon Sep 17 00:00:00 2001 From: Dustin Brickwood Date: Wed, 1 Jun 2022 16:11:52 -0500 Subject: [PATCH 09/13] fix: .env issue --- .github/workflows/publish-docker.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index a6bcdb5dd..a9f9c99fe 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -1,6 +1,7 @@ name: Docker on: + workflow_dispatch: schedule: - cron: '26 16 * * *' push: @@ -9,8 +10,6 @@ on: pull_request: branches: [ main ] - workflow_dispatch: - env: REGISTRY: ghcr.io IMAGE_NAME_1: ${{ github.repository }}/egg-standalone-node @@ -25,9 +24,9 @@ jobs: matrix: include: - dockerfile: ./docker/Standalone.Dockerfile - image: ghcr.io/${{ env.IMAGE_NAME_1 }} + image: $REGISTRY / $IMAGE_NAME_1 - dockerfile: ./docker/Parachain.Dockerfile - image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_2 }} + image: $REGISTRY / $IMAGE_NAME_2 permissions: contents: read packages: write From 4bb5e5a39bc69fa24fea445968447fdcbf57c5b7 Mon Sep 17 00:00:00 2001 From: Dustin Brickwood Date: Wed, 1 Jun 2022 16:13:20 -0500 Subject: [PATCH 10/13] fix: .env issue --- .github/workflows/publish-docker.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index a9f9c99fe..e69a31eea 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -24,9 +24,9 @@ jobs: matrix: include: - dockerfile: ./docker/Standalone.Dockerfile - image: $REGISTRY / $IMAGE_NAME_1 + image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_1 }} - dockerfile: ./docker/Parachain.Dockerfile - image: $REGISTRY / $IMAGE_NAME_2 + image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_2 }} permissions: contents: read packages: write From 3f6b4a24ecb635dad792cc01e8b5a1d3d7d00010 Mon Sep 17 00:00:00 2001 From: Dustin Brickwood Date: Wed, 1 Jun 2022 16:17:27 -0500 Subject: [PATCH 11/13] fix: .env issue --- .github/workflows/publish-docker.yml | 4 +- keys.json | 121 +++++++++++++++++++++++++++ 2 files changed, 123 insertions(+), 2 deletions(-) create mode 100644 keys.json diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index e69a31eea..972f35557 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -24,9 +24,9 @@ jobs: matrix: include: - dockerfile: ./docker/Standalone.Dockerfile - image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_1 }} + image: ghcr.io/${{ github.repository }}/egg-standalone-node - dockerfile: ./docker/Parachain.Dockerfile - image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_2 }} + image: ghcr.io/${{ github.repository }}/egg-collator permissions: contents: read packages: write diff --git a/keys.json b/keys.json new file mode 100644 index 000000000..a62371552 --- /dev/null +++ b/keys.json @@ -0,0 +1,121 @@ +gown surprise mirror hotel cash alarm raccoon you frog rose midnight enter + Secret seed: 0x5258900fef44f6c5e13ac2d1b1922e788f84137b2815520a48366f44f32b1445 + Public key (hex): 0x888a3ab33eea2b827f15302cb26af0e007b067ccfbf693faff3aa7ffcfa25925 + Account ID: 0x888a3ab33eea2b827f15302cb26af0e007b067ccfbf693faff3aa7ffcfa25925 + Public key (SS58): 5F9jS22zsSzmWNXKt4kknBsrhVAokEQ9e3UcuBeg21hkzqWz + SS58 Address: 5F9jS22zsSzmWNXKt4kknBsrhVAokEQ9e3UcuBeg21hkzqWz + +Secret Key URI `gown surprise mirror hotel cash alarm raccoon you frog rose midnight enter//webb//0` is account: + Secret seed: 0xa8584767faa6fc1becb5ebe83593eecf03473a3577aa616cc243e637ff80c2e7 + Public key (hex): 0x4e85271af1330e5e9384bd3ac5bdc04c0f8ef5a8cc29c1a8ae483d674164745c + Account ID: 0x4e85271af1330e5e9384bd3ac5bdc04c0f8ef5a8cc29c1a8ae483d674164745c + Public key (SS58): 5Dqf9U5dgQ9GLqdfaxXGjpZf9af1sCV8UrnpRgqJPbe3wCwX + SS58 Address: 5Dqf9U5dgQ9GLqdfaxXGjpZf9af1sCV8UrnpRgqJPbe3wCwX +Secret Key URI `gown surprise mirror hotel cash alarm raccoon you frog rose midnight enter//webb//0//stash` is account: + + + + +egg-standalone-node key insert --base-path /tmp/standalone/dkg-lion \ +--chain "./resources/arana-standalone-raw.json" \ +--scheme Sr25519 \ +--suri "gown surprise mirror hotel cash alarm raccoon you frog rose midnight enter" \ +--key-type acco + + + +egg-standalone-node key insert --base-path /tmp/standalone/dkg-lion \ +--chain "./resources/arana-standalone-raw.json" \ +--scheme Sr25519 \ +--suri "gown surprise mirror hotel cash alarm raccoon you frog rose midnight enter//webb//0" \ +--key-type acco + + +egg-standalone-node key insert --base-path /tmp/standalone/dkg-lion \ +--chain "./resources/arana-standalone-raw.json" \ +--scheme Sr25519 \ +--suri "gown surprise mirror hotel cash alarm raccoon you frog rose midnight enter//webb//0//stash" \ +--key-type acco + +egg-standalone-node key insert --base-path /tmp/standalone/dkg-lion \ +--chain "./resources/arana-standalone-raw.json" \ +--scheme Sr25519 \ +--suri "gown surprise mirror hotel cash alarm raccoon you frog rose midnight enter//webb//0//aura" \ +--key-type aura + +egg-standalone-node key insert --base-path /tmp/standalone/dkg-lion \ +--chain "./resources/arana-standalone-raw.json" \ +--scheme Ed25519 \ +--suri "gown surprise mirror hotel cash alarm raccoon you frog rose midnight enter//webb//0//grandpa" \ +--key-type gran + +egg-standalone-node key insert --base-path /tmp/standalone/dkg-lion \ +--chain "./resources/arana-standalone-raw.json" \ +--scheme Ecdsa \ +--suri "gown surprise mirror hotel cash alarm raccoon you frog rose midnight enter//webb//0//dkg" \ +--key-type wdkg + + +egg-standalone-node key insert --base-path /tmp/standalone/dkg-tiger \ +--chain "./resources/arana-standalone-raw.json" \ +--scheme Sr25519 \ +--suri "gown surprise mirror hotel cash alarm raccoon you frog rose midnight enter//webb//1" \ +--key-type acco + + +egg-standalone-node key insert --base-path /tmp/standalone/dkg-tiger \ +--chain "./resources/arana-standalone-raw.json" \ +--scheme Sr25519 \ +--suri "gown surprise mirror hotel cash alarm raccoon you frog rose midnight enter//webb//1//stash" \ +--key-type acco + +egg-standalone-node key insert --base-path /tmp/standalone/dkg-tiger \ +--chain "./resources/arana-standalone-raw.json" \ +--scheme Sr25519 \ +--suri "gown surprise mirror hotel cash alarm raccoon you frog rose midnight enter//webb//1//aura" \ +--key-type aura + +egg-standalone-node key insert --base-path /tmp/standalone/dkg-tiger \ +--chain "./resources/arana-standalone-raw.json" \ +--scheme Ed25519 \ +--suri "gown surprise mirror hotel cash alarm raccoon you frog rose midnight enter//webb//1//grandpa" \ +--key-type gran + +egg-standalone-node key insert --base-path /tmp/standalone/dkg-tiger \ +--chain "./resources/arana-standalone-raw.json" \ +--scheme Ecdsa \ +--suri "gown surprise mirror hotel cash alarm raccoon you frog rose midnight enter//webb//1//dkg" \ +--key-type wdkg + + + +egg-standalone-node key insert --base-path /tmp/standalone/dkg-lynx \ +--chain "./resources/arana-standalone-raw.json" \ +--scheme Sr25519 \ +--suri "gown surprise mirror hotel cash alarm raccoon you frog rose midnight enter//webb//2" \ +--key-type acco + + +egg-standalone-node key insert --base-path /tmp/standalone/dkg-lynx \ +--chain "./resources/arana-standalone-raw.json" \ +--scheme Sr25519 \ +--suri "gown surprise mirror hotel cash alarm raccoon you frog rose midnight enter//webb//2//stash" \ +--key-type acco + +egg-standalone-node key insert --base-path /tmp/standalone/dkg-lynx \ +--chain "./resources/arana-standalone-raw.json" \ +--scheme Sr25519 \ +--suri "gown surprise mirror hotel cash alarm raccoon you frog rose midnight enter//webb//2//aura" \ +--key-type aura + +egg-standalone-node key insert --base-path /tmp/standalone/dkg-lynx \ +--chain "./resources/arana-standalone-raw.json" \ +--scheme Ed25519 \ +--suri "gown surprise mirror hotel cash alarm raccoon you frog rose midnight enter//webb//2//grandpa" \ +--key-type gran + +egg-standalone-node key insert --base-path /tmp/standalone/dkg-lynx \ +--chain "./resources/arana-standalone-raw.json" \ +--scheme Ecdsa \ +--suri "gown surprise mirror hotel cash alarm raccoon you frog rose midnight enter//webb//2//dkg" \ +--key-type wdkg \ No newline at end of file From 22916baac746b5f3c4ac0aac0d1f2cff05b0edd6 Mon Sep 17 00:00:00 2001 From: Dustin Brickwood Date: Wed, 1 Jun 2022 17:05:02 -0500 Subject: [PATCH 12/13] chore: fix wrong path for dockerfile --- .github/workflows/publish-docker.yml | 2 +- docker/Standalone.Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index 972f35557..58abb8326 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -81,7 +81,7 @@ jobs: uses: docker/build-push-action@v3 with: context: . - file: ./docker/Standalone.Dockerfile + file: ${{ matrix.dockerfile }} push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/docker/Standalone.Dockerfile b/docker/Standalone.Dockerfile index 905bae36a..64f905949 100644 --- a/docker/Standalone.Dockerfile +++ b/docker/Standalone.Dockerfile @@ -21,7 +21,7 @@ FROM phusion/baseimage:bionic-1.0.0 RUN useradd -m -u 1000 -U -s /bin/sh -d /dkg dkg -COPY --from=builder /network/target/release/dkg-node /usr/local/bin +COPY --from=builder /network/target/release/egg-standalone-node /usr/local/bin # checks RUN ldd /usr/local/bin/egg-standalone-node && \ From 4c97245aa5f10faa29e7d84dbd26ab10ee0e72dc Mon Sep 17 00:00:00 2001 From: Dustin Brickwood Date: Wed, 1 Jun 2022 17:16:23 -0500 Subject: [PATCH 13/13] chore: remove cron job --- .github/workflows/publish-docker.yml | 3 +- keys.json | 121 --------------------------- 2 files changed, 1 insertion(+), 123 deletions(-) delete mode 100644 keys.json diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index 58abb8326..8f205378b 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -2,8 +2,7 @@ name: Docker on: workflow_dispatch: - schedule: - - cron: '26 16 * * *' + push: branches: [ main ] tags: [ 'v*.*.*' ] diff --git a/keys.json b/keys.json deleted file mode 100644 index a62371552..000000000 --- a/keys.json +++ /dev/null @@ -1,121 +0,0 @@ -gown surprise mirror hotel cash alarm raccoon you frog rose midnight enter - Secret seed: 0x5258900fef44f6c5e13ac2d1b1922e788f84137b2815520a48366f44f32b1445 - Public key (hex): 0x888a3ab33eea2b827f15302cb26af0e007b067ccfbf693faff3aa7ffcfa25925 - Account ID: 0x888a3ab33eea2b827f15302cb26af0e007b067ccfbf693faff3aa7ffcfa25925 - Public key (SS58): 5F9jS22zsSzmWNXKt4kknBsrhVAokEQ9e3UcuBeg21hkzqWz - SS58 Address: 5F9jS22zsSzmWNXKt4kknBsrhVAokEQ9e3UcuBeg21hkzqWz - -Secret Key URI `gown surprise mirror hotel cash alarm raccoon you frog rose midnight enter//webb//0` is account: - Secret seed: 0xa8584767faa6fc1becb5ebe83593eecf03473a3577aa616cc243e637ff80c2e7 - Public key (hex): 0x4e85271af1330e5e9384bd3ac5bdc04c0f8ef5a8cc29c1a8ae483d674164745c - Account ID: 0x4e85271af1330e5e9384bd3ac5bdc04c0f8ef5a8cc29c1a8ae483d674164745c - Public key (SS58): 5Dqf9U5dgQ9GLqdfaxXGjpZf9af1sCV8UrnpRgqJPbe3wCwX - SS58 Address: 5Dqf9U5dgQ9GLqdfaxXGjpZf9af1sCV8UrnpRgqJPbe3wCwX -Secret Key URI `gown surprise mirror hotel cash alarm raccoon you frog rose midnight enter//webb//0//stash` is account: - - - - -egg-standalone-node key insert --base-path /tmp/standalone/dkg-lion \ ---chain "./resources/arana-standalone-raw.json" \ ---scheme Sr25519 \ ---suri "gown surprise mirror hotel cash alarm raccoon you frog rose midnight enter" \ ---key-type acco - - - -egg-standalone-node key insert --base-path /tmp/standalone/dkg-lion \ ---chain "./resources/arana-standalone-raw.json" \ ---scheme Sr25519 \ ---suri "gown surprise mirror hotel cash alarm raccoon you frog rose midnight enter//webb//0" \ ---key-type acco - - -egg-standalone-node key insert --base-path /tmp/standalone/dkg-lion \ ---chain "./resources/arana-standalone-raw.json" \ ---scheme Sr25519 \ ---suri "gown surprise mirror hotel cash alarm raccoon you frog rose midnight enter//webb//0//stash" \ ---key-type acco - -egg-standalone-node key insert --base-path /tmp/standalone/dkg-lion \ ---chain "./resources/arana-standalone-raw.json" \ ---scheme Sr25519 \ ---suri "gown surprise mirror hotel cash alarm raccoon you frog rose midnight enter//webb//0//aura" \ ---key-type aura - -egg-standalone-node key insert --base-path /tmp/standalone/dkg-lion \ ---chain "./resources/arana-standalone-raw.json" \ ---scheme Ed25519 \ ---suri "gown surprise mirror hotel cash alarm raccoon you frog rose midnight enter//webb//0//grandpa" \ ---key-type gran - -egg-standalone-node key insert --base-path /tmp/standalone/dkg-lion \ ---chain "./resources/arana-standalone-raw.json" \ ---scheme Ecdsa \ ---suri "gown surprise mirror hotel cash alarm raccoon you frog rose midnight enter//webb//0//dkg" \ ---key-type wdkg - - -egg-standalone-node key insert --base-path /tmp/standalone/dkg-tiger \ ---chain "./resources/arana-standalone-raw.json" \ ---scheme Sr25519 \ ---suri "gown surprise mirror hotel cash alarm raccoon you frog rose midnight enter//webb//1" \ ---key-type acco - - -egg-standalone-node key insert --base-path /tmp/standalone/dkg-tiger \ ---chain "./resources/arana-standalone-raw.json" \ ---scheme Sr25519 \ ---suri "gown surprise mirror hotel cash alarm raccoon you frog rose midnight enter//webb//1//stash" \ ---key-type acco - -egg-standalone-node key insert --base-path /tmp/standalone/dkg-tiger \ ---chain "./resources/arana-standalone-raw.json" \ ---scheme Sr25519 \ ---suri "gown surprise mirror hotel cash alarm raccoon you frog rose midnight enter//webb//1//aura" \ ---key-type aura - -egg-standalone-node key insert --base-path /tmp/standalone/dkg-tiger \ ---chain "./resources/arana-standalone-raw.json" \ ---scheme Ed25519 \ ---suri "gown surprise mirror hotel cash alarm raccoon you frog rose midnight enter//webb//1//grandpa" \ ---key-type gran - -egg-standalone-node key insert --base-path /tmp/standalone/dkg-tiger \ ---chain "./resources/arana-standalone-raw.json" \ ---scheme Ecdsa \ ---suri "gown surprise mirror hotel cash alarm raccoon you frog rose midnight enter//webb//1//dkg" \ ---key-type wdkg - - - -egg-standalone-node key insert --base-path /tmp/standalone/dkg-lynx \ ---chain "./resources/arana-standalone-raw.json" \ ---scheme Sr25519 \ ---suri "gown surprise mirror hotel cash alarm raccoon you frog rose midnight enter//webb//2" \ ---key-type acco - - -egg-standalone-node key insert --base-path /tmp/standalone/dkg-lynx \ ---chain "./resources/arana-standalone-raw.json" \ ---scheme Sr25519 \ ---suri "gown surprise mirror hotel cash alarm raccoon you frog rose midnight enter//webb//2//stash" \ ---key-type acco - -egg-standalone-node key insert --base-path /tmp/standalone/dkg-lynx \ ---chain "./resources/arana-standalone-raw.json" \ ---scheme Sr25519 \ ---suri "gown surprise mirror hotel cash alarm raccoon you frog rose midnight enter//webb//2//aura" \ ---key-type aura - -egg-standalone-node key insert --base-path /tmp/standalone/dkg-lynx \ ---chain "./resources/arana-standalone-raw.json" \ ---scheme Ed25519 \ ---suri "gown surprise mirror hotel cash alarm raccoon you frog rose midnight enter//webb//2//grandpa" \ ---key-type gran - -egg-standalone-node key insert --base-path /tmp/standalone/dkg-lynx \ ---chain "./resources/arana-standalone-raw.json" \ ---scheme Ecdsa \ ---suri "gown surprise mirror hotel cash alarm raccoon you frog rose midnight enter//webb//2//dkg" \ ---key-type wdkg \ No newline at end of file