-
Notifications
You must be signed in to change notification settings - Fork 161
38 lines (38 loc) · 1.43 KB
/
upload-delegates.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
on:
push:
branches:
- master
paths:
- governance/delegates/**/*
- '!governance/delegates/meta/delegates.json'
jobs:
upload_delegates:
runs-on: ubuntu-latest
name: Parses all the delegates and uploads all to IPFS, creating a pull request with the new file.
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Upload
id: upload
uses: makerdao-dux/[email protected]
with:
delegates-folder: 'governance/delegates'
tags-file: 'governance/delegates/meta/tags.json'
infura-id: ${{ secrets.INFURA_ID }}
infura-secret: ${{ secrets.INFURA_KEY }}
output-file: 'governance/delegates/meta/delegates.json'
# Use the output from the `upload` step
- name: Get the output hash
run: echo "The IPFS hash was ${{ steps.upload.outputs.hash }}"
- name: Update pull request with delegates changes.
uses: EndBug/add-and-commit@v9 # You can change this to use a specific version.
with:
author_name: github-actions[bot]
author_email: github-actions[bot]@users.noreply.github.com
message: 'Added delegates aggregated file'
add: 'governance/delegates/meta/delegates.json'
fetch: false
push: false
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4