-
Notifications
You must be signed in to change notification settings - Fork 247
49 lines (43 loc) · 1.95 KB
/
domain-genesis-storage-snapshot-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# 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@c56af957549030174b10d6867f20e78cfd7debc5 # @v3.2.0
with:
file: Dockerfile-node
push: false
- name: Generate testnet domain genesis storages
run: |
docker run --rm -u root ${{ steps.build.outputs.digest }} domain build-genesis-storage --chain gemini-3h > domain-genesis-storage-gemini-3h
docker run --rm -u root ${{ steps.build.outputs.digest }} domain build-genesis-storage --chain devnet > domain-genesis-storage-devnet
- name: Upload domain genesis storages to artifacts
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # @v3.1.1
with:
name: domain-genesis-storage
path: |
domain-genesis-storage-gemini-3h
domain-genesis-storage-devnet
if-no-files-found: error
- name: Upload domain genesis storages to assets
uses: alexellis/upload-assets@259de5111cb56966d046ced998941e93f91d2c93 # @0.4.0
env:
GITHUB_TOKEN: ${{ github.token }}
with:
asset_paths: '["domain-genesis-storage-gemini-3h", "domain-genesis-storage-devnet"]'
# Only run for releases
if: github.event_name == 'push' && github.ref_type == 'tag'