Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 10 additions & 12 deletions .github/workflows/updates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,25 @@ jobs:

- name: Fetch workflow data
env:
GH_TOKEN: ${{ secrets.GH_PAT }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh api repos/urunc-dev/urunc/actions/workflows \
--paginate > workflows_raw.json

echo "{}" > runs_raw.json

jq -r '.workflows[] | "\(.id) \(.name)"' workflows_raw.json | while read wf_id wf_name; do
jq -r '.workflows[] | "\(.id)\t\(.name)"' workflows_raw.json | while IFS=$'\t' read -r wf_id wf_name; do
echo "Processing workflow: $wf_name (ID: $wf_id)"

gh api "repos/urunc-dev/urunc/actions/workflows/${wf_id}/runs?per_page=20" \
> runs_tmp.json
> runs_tmp.json

jq --arg id "$wf_id" \
--arg name "$wf_name" \
--slurpfile runs runs_tmp.json \
'. + {($id): ($runs[0] + {name: $name})}' \
runs_raw.json > tmp.json
--arg name "$wf_name" \
--slurpfile runs runs_tmp.json \
'. + {($id): ($runs[0] + {name: $name})}' \
runs_raw.json > tmp.json

mv tmp.json runs_raw.json
done
echo "===== FINAL workflows_raw.json ====="
Expand All @@ -51,8 +51,6 @@ jobs:
rm -f runs_tmp.json

- name: Generate stats
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: go run .

- name: Cleanup temp files
Expand Down
6 changes: 6 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ settings:
refresh_interval: 60
max_runs_per_workflow: 20

# notify logic
notify:
enabled: false
target_repo: "urunc-dev/ci-dashboard"
label: "ci-failure"

log_analysis:
max_signals_per_job: 40

Expand Down
Loading