-
Notifications
You must be signed in to change notification settings - Fork 242
50 lines (44 loc) · 1.9 KB
/
chain-spec-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
50
# This action enabling building chain spec used in the node build, can be triggered manually or by release creation.
#
# Regular and raw chain specs are built both for releases and for manually triggered runs, uploaded to artifacts and
# assets.
name: Chain spec snapshot build
on:
workflow_dispatch:
push:
tags:
- 'chain-spec-snapshot-*'
- 'chain-spec-gemini-*'
jobs:
chains-spec:
runs-on: ${{ fromJson(github.repository_owner == 'autonomys' && '["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 chain specifications
run: |
docker run --rm -u root ${{ steps.build.outputs.digest }} build-spec --chain gemini-3h-compiled --disable-default-bootnode > chain-spec-gemini-3h.json
docker run --rm -u root ${{ steps.build.outputs.digest }} build-spec --chain gemini-3h-compiled --disable-default-bootnode --raw > chain-spec-raw-gemini-3h.json
- name: Upload chain specifications to artifacts
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.1.3
with:
name: chain-specifications
path: |
chain-spec-gemini-3h.json
chain-spec-raw-gemini-3h.json
if-no-files-found: error
- name: Upload chain specifications to assets
uses: alexellis/upload-assets@13926a61cdb2cb35f5fdef1c06b8b591523236d3 # 0.4.1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
asset_paths: '["chain-spec-gemini-3h.json", "chain-spec-raw-gemini-3h.json"]'
# Only run for releases
if: github.event_name == 'push' && github.ref_type == 'tag'