forked from NSPG13/agent-bounties
-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (70 loc) · 2.69 KB
/
Copy pathparticipant-registration.yml
File metadata and controls
74 lines (70 loc) · 2.69 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
63
64
65
66
67
68
69
70
71
72
73
74
name: Participant Registration
on:
pull_request:
paths:
- ".github/workflows/participant-registration.yml"
- "scripts/register_participant.py"
- "scripts/test_register_participant.py"
issue_comment:
types: [created, edited]
permissions:
contents: read
jobs:
contract:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5a
- uses: actions/setup-python@v7
with:
python-version: "3.12"
- run: python scripts/test_register_participant.py -v
register:
if: >-
github.event_name == 'issue_comment' &&
github.event.issue.pull_request == null &&
startsWith(github.event.comment.body, '/agent-bounty register ')
permissions:
contents: read
issues: write
runs-on: ubuntu-latest
timeout-minutes: 10
concurrency:
group: participant-registration-${{ github.event.sender.id }}
cancel-in-progress: false
env:
BASE_KEEPER_PRIVATE_KEY: ${{ secrets.BASE_KEEPER_PRIVATE_KEY }}
PARTICIPANT_ATTESTER_PRIVATE_KEY: ${{ secrets.PARTICIPANT_ATTESTER_PRIVATE_KEY }}
PARTICIPANT_REGISTRY: ${{ vars.BASE_MAINNET_PARTICIPANT_REGISTRY }}
BASE_MAINNET_RPC_URL: ${{ vars.BASE_MAINNET_RPC_URL || 'https://mainnet.base.org' }}
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5a
- uses: actions/setup-python@v7
with:
python-version: "3.12"
- uses: foundry-rs/foundry-toolchain@b00af27efadbc7b4ca8b82abbd903b17cc874d2a
- name: Register exact GitHub participant identity
id: register
continue-on-error: true
run: >-
python scripts/register_participant.py
--event "$GITHUB_EVENT_PATH"
--repository "$GITHUB_REPOSITORY"
--registry "$PARTICIPANT_REGISTRY"
--rpc-url "$BASE_MAINNET_RPC_URL,https://mainnet.base.org,https://base.drpc.org"
--json-out target/participant-registration.json
--md-out target/participant-registration.md
- name: Publish constructive registration result
if: always()
run: gh issue comment "${{ github.event.issue.number }}" --repo "$GITHUB_REPOSITORY" --body-file target/participant-registration.md
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
if: always()
with:
name: participant-registration-${{ github.event.comment.id }}
path: target/participant-registration.json
if-no-files-found: warn
retention-days: 30
- name: Preserve fail-closed status
if: steps.register.outcome != 'success'
run: exit 1