Skip to content

Merge pull request #2869 from subspace/bump-runtime-ver #5

Merge pull request #2869 from subspace/bump-runtime-ver

Merge pull request #2869 from subspace/bump-runtime-ver #5

# This action enabling building domain genesis storage used in registering new domain runtime, can be triggered manually or by release creation.
#
# Domain genesis storages are built for releases and for manually triggered runs, uploaded to artifacts and assets.
name: Domain genesis storage snapshot build
on:
workflow_dispatch:
push:
tags:
- 'domain-genesis-storage-snapshot-*'
- 'domain-genesis-storage-gemini-*'
jobs:
domain-genesis-storage:
runs-on: ${{ fromJson(github.repository_owner == 'subspace' && '["self-hosted", "ubuntu-20.04-x86-64"]' || 'ubuntu-22.04') }}
permissions:
contents: write
packages: write
steps:
- name: Build node image
id: build
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
with:
file: Dockerfile-node
push: false
- name: Generate testnet domain genesis storages
run: |
EVM_SPEC_VERSION=$(sed -nr 's/.*spec_version: ([0-9]+),/\1/p' domains/runtime/evm/src/lib.rs)
AUTO_ID_SPEC_VERSION=$(sed -nr 's/.*spec_version: ([0-9]+),/\1/p' domains/runtime/auto-id/src/lib.rs)
docker run --rm -u root ${{ steps.build.outputs.digest }} domain build-genesis-storage --runtime-type evm --chain gemini-3h > evm-domain-genesis-storage-gemini-3h-v$EVM_SPEC_VERSION
docker run --rm -u root ${{ steps.build.outputs.digest }} domain build-genesis-storage --runtime-type evm --chain devnet > evm-domain-genesis-storage-devnet-v$EVM_SPEC_VERSION
docker run --rm -u root ${{ steps.build.outputs.digest }} domain build-genesis-storage --runtime-type auto-id --chain gemini-3h > auto-id-domain-genesis-storage-gemini-3h-v$AUTO_ID_SPEC_VERSION
docker run --rm -u root ${{ steps.build.outputs.digest }} domain build-genesis-storage --runtime-type auto-id --chain devnet > auto-id-domain-genesis-storage-devnet-v$AUTO_ID_SPEC_VERSION
echo "EVM_SPEC_VERSION=$EVM_SPEC_VERSION" >> $GITHUB_ENV
echo "AUTO_ID_SPEC_VERSION=$AUTO_ID_SPEC_VERSION" >> $GITHUB_ENV
- name: Upload domain genesis storages to artifacts
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.1.3
with:
name: domain-genesis-storage
path: |
evm-domain-genesis-storage-gemini-3h-v${{ env.EVM_SPEC_VERSION }}
evm-domain-genesis-storage-devnet-v${{ env.EVM_SPEC_VERSION }}
auto-id-domain-genesis-storage-gemini-3h-v${{ env.AUTO_ID_SPEC_VERSION }}
auto-id-domain-genesis-storage-devnet-v${{ env.AUTO_ID_SPEC_VERSION }}
if-no-files-found: error
- name: Upload domain genesis storages to assets
uses: alexellis/upload-assets@13926a61cdb2cb35f5fdef1c06b8b591523236d3 # 0.4.1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
asset_paths: '["evm-domain-genesis-storage-gemini-3h-v${{ env.EVM_SPEC_VERSION }}", "evm-domain-genesis-storage-devnet-v${{ env.EVM_SPEC_VERSION }}", "auto-id-domain-genesis-storage-gemini-3h-v${{ env.AUTO_ID_SPEC_VERSION }}", "auto-id-domain-genesis-storage-devnet-v${{ env.AUTO_ID_SPEC_VERSION }}"]'
# Only run for releases
if: github.event_name == 'push' && github.ref_type == 'tag'