-
Notifications
You must be signed in to change notification settings - Fork 43
91 lines (90 loc) · 3.1 KB
/
create-dummy-dao.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Dummy Dao
on:
workflow_call:
inputs:
last_commit:
required: true
type: string
secrets:
ARABOT_PAT:
description: 'A token passed from the caller workflow'
required: true
ETH_KEY:
description: 'A token passed from the caller workflow'
required: true
workflow_dispatch:
push:
branches:
- develop
- main
paths:
- '.github/workflows/create-dummy-dao.yml'
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
environment: ${{ steps.prepare.outputs.environment }}
tags: ${{ steps.prepare.outputs.tags }}
matrix: ${{ steps.prepare.outputs.matrix }}
steps:
- uses: actions/checkout@v2
- name: Prepare
id: prepare
run: node .github/helpers/contracts/prepare.js '${{ github.ref }}'
create-dummy-daos:
runs-on: ubuntu-latest
needs: [prepare]
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.prepare.outputs.matrix) }}
steps:
- uses: actions/checkout@v2
with:
ref: ${{ inputs.last_commit }}
- name: Install node
uses: actions/setup-node@v3
with:
cache: 'yarn'
node-version: 16
- name: Install dependencies
run: yarn install --pure-lockfile
- name: Compile
run: cd packages/contracts && yarn run build
- name: create Dummy DAOs token
run: node .github/helpers/contracts/dummy-dao/createDao.js ${{matrix.network}} ${{ secrets.ETH_KEY }} token
- name: create Dummy DAOs addresslist
run: node .github/helpers/contracts/dummy-dao/createDao.js ${{matrix.network}} ${{ secrets.ETH_KEY }}
- name: Deposit to TokenVoting DAO
run: node .github/helpers/contracts/dummy-dao/deposit.js ${{matrix.network}} ${{ secrets.ETH_KEY }} token
- name: Deposit to AddresslistVoting DAO
run: node .github/helpers/contracts/dummy-dao/deposit.js ${{matrix.network}} ${{ secrets.ETH_KEY }}
- name: Proposal of TokenVoting
run: node .github/helpers/contracts/dummy-dao/proposal.js ${{matrix.network}} ${{ secrets.ETH_KEY }} token
- name: Proposal of AddresslistVoting
run: node .github/helpers/contracts/dummy-dao/proposal.js ${{matrix.network}} ${{ secrets.ETH_KEY }}
- uses: actions/upload-artifact@v2
with:
name: ${{matrix.network}}
path: ./dummy_daos.json
retention-days: 1
conclude-dummy-daos:
runs-on: ubuntu-latest
needs: ['create-dummy-daos']
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.ARABOT_PAT }}
- uses: actions/download-artifact@v3
with:
path: artefacts
- name: Update updateDummyDaoJSON.json
run: node .github/helpers/contracts/dummy-dao/updateDummyDaoJSON.js
- name: Commit changes
run: |
git fetch
git pull
git config --global user.name "Arabot-1"
git config --global user.email "[email protected]"
git add dummy_daos.json
git commit -am "Updates files with dummy DAOs info"
git push