-
Notifications
You must be signed in to change notification settings - Fork 261
Expand file tree
/
Copy pathhandler.run-ethereum-contracts-script.yml
More file actions
62 lines (53 loc) · 1.9 KB
/
handler.run-ethereum-contracts-script.yml
File metadata and controls
62 lines (53 loc) · 1.9 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
name: Run Ethereum Contracts Script
on:
workflow_dispatch:
inputs:
release_version:
description: 'Protocol release version (test/master/v1/etc.)'
required: true
default: 'v1'
network:
description: 'Network for the script to run on'
required: true
admin_type:
description: 'Choose the admin type: MULTISIG, or OWNABLE. Defaults to autodetect.'
required: false
script_name:
description: 'Script name'
required: true
script_args:
description: 'Script arguments'
required: false
environments:
description: 'Additional env vars, separated by semicolons'
required: false
jobs:
run-ethereum-contracts-script:
runs-on: ubuntu-22.04
defaults:
run:
shell: nix develop .#ci-default -c bash -xe {0}
env:
RELEASE_VERSION: ${{ github.event.inputs.release_version }}
RESOLVER_ADMIN_TYPE: ${{ github.event.inputs.admin_type }}
GOVERNANCE_ADMIN_TYPE: ${{ github.event.inputs.admin_type }}
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v13
- name: Build
run: |
yarn install --frozen-lockfile
yarn build-for-contracts-dev
- name: Execute truffle script
run: |
cd packages/ethereum-contracts
echo "Admin type: ${{ github.event.inputs.admin_type }}"
echo "${{ github.event.inputs.environments }}" | sed 's/;/\n/' > .env
npx truffle exec \
--network ${{ github.event.inputs.network }} \
${{ github.event.inputs.script_name }} \
${{ github.event.inputs.script_args }}
env:
RELEASE_VERSION: ${{ github.event.inputs.release_version }}
DEFAULT_MNEMONIC: ${{ secrets.BUILD_AGENT_MNEMONIC }}
PROVIDER_URL_TEMPLATE: ${{ secrets.PROVIDER_URL_TEMPLATE }}