-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 1.28 KB
/
crowdcode-vote-counting.yml
File metadata and controls
51 lines (43 loc) · 1.28 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
name: CrowdCode - Vote Counting
on:
pull_request_review:
types: [submitted, edited, dismissed]
issue_comment:
types: [created]
schedule:
- cron: '0 * * * *' # Hourly
workflow_dispatch:
inputs:
dry_run:
description: 'Dry run mode (no actual changes)'
required: false
default: 'false'
type: boolean
permissions:
pull-requests: write
issues: write
jobs:
count-votes:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install PyGithub pyyaml
- name: Count and Update Votes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
DRY_RUN: ${{ github.event.inputs.dry_run || 'false' }}
run: |
python scripts/validate-votes.py
- name: Summary
run: |
echo "## CrowdCode Vote Counting Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "Vote counting completed. Check script output for details." >> $GITHUB_STEP_SUMMARY