Merge pull request #2561 from blimpa/Offboarding-AD-0xDefensor #87
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |