This repository was archived by the owner on Apr 14, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree File renamed without changes.
Original file line number Diff line number Diff line change 1+ name : Trigger Fee Collection on Mimic Merge
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ manual_date :
7+ description : ' End date to process (YYYYMMDD format)'
8+ required : true
9+ type : string
10+ push :
11+ branches :
12+ - main
13+ paths :
14+ - ' fee_allocator/fees_collected/*.json'
15+
16+ jobs :
17+ trigger_fee_collection :
18+ runs-on : ubuntu-latest
19+
20+ steps :
21+ - name : Checkout
22+ uses : actions/checkout@v4
23+ with :
24+ fetch-depth : 0
25+
26+ - name : Get date from filename
27+ id : get-date
28+ run : |
29+ if [ ! -z "${{ inputs.manual_date }}" ]; then
30+ echo "end-date=${{ inputs.manual_date }}" >> $GITHUB_OUTPUT
31+ exit 0
32+ fi
33+
34+ # Get the path of the changed JSON file
35+ JSON_PATH=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep 'fee_allocator/fees_collected/.*\.json$' | head -n 1)
36+
37+ if [ -z "$JSON_PATH" ]; then
38+ echo "No JSON file found in recent changes."
39+ exit 1
40+ fi
41+
42+ echo "JSON Path: $JSON_PATH"
43+
44+ # Extract the end date from filename using cut
45+ END_DATE=$(basename "$JSON_PATH" | cut -d'_' -f3 | cut -d'.' -f1)
46+
47+ echo "end-date=$END_DATE" >> $GITHUB_OUTPUT
48+
49+ - name : Trigger collect_fees_v2 workflow
50+ uses : benc-uk/workflow-dispatch@v1
51+ with :
52+ workflow : Process and run reports for a fee round
53+ inputs : ' {"end_day": "${{ steps.get-date.outputs.end-date }}"}'
You can’t perform that action at this time.
0 commit comments