-
Notifications
You must be signed in to change notification settings - Fork 63
37 lines (35 loc) · 1.17 KB
/
verify-contribution.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
name: Verify contribution
on:
pull_request_target:
branches:
- ceremony/*
paths:
- contributions/*
permissions: write-all
jobs:
verify-contribution:
runs-on: [self-hosted, ci2-1]
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Build toolkit
run: |
docker build . -q --target zk-voceremony --tag vocdoni/zk-voceremony
- name: Checkout the fork
uses: actions/checkout@v4
with:
lfs: true
ref: ${{ github.event.pull_request.head.sha }}
- name: Checkout LFS objects
run: git lfs checkout
- name: Run toolkit
run: |
docker run --rm -qt -v ./:/app --env-file ./ceremony.env vocdoni/zk-voceremony verify
- name: Merge PR branch
if: success() && contains(github.event.pull_request.title, 'Contribution:')
run: |
gh pr merge --admin --squash "$PR_URL" \
|| gh pr close -c "Failed, likely another contribution was merged concurrently and yours was lost, please restart your contribution from scratch" "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}