-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a script that fetches PR data and created a separate view on the dashboard. Fixes #1 Signed-off-by: Anna Finn <[email protected]>
- Loading branch information
Showing
6 changed files
with
1,014 additions
and
332 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Fetch CI Data | ||
run-name: Fetch CI Data | ||
on: | ||
schedule: | ||
- cron: '0 */2 * * *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
fetch-and-commit-data: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Update dashboard data | ||
run: | | ||
# fetch ci nightly data as temporary file | ||
TOKEN=${{ secrets.GITHUB_TOKEN }} node scripts/fetch-ci-nightly-data.js | tee tmp-data.json | ||
TOKEN=${{ secrets.GITHUB_TOKEN }} node scripts/fetch-ci-pr-data.js | tee tmp-data2.json | ||
# switch to a branch specifically for holding latest data | ||
git config --global user.name "GH Actions Workflow" | ||
git config --global user.email "<gha@runner>" | ||
git fetch --all | ||
git checkout latest-dashboard-data | ||
# back out whatever data was there | ||
git reset HEAD~1 | ||
# overwrite the old data | ||
mkdir -p data/ | ||
mv tmp-data.json data/job_stats.json | ||
mv tmp-data2.json data/check_stats.json | ||
# commit | ||
git add data | ||
git commit -m '[skip ci] latest ci nightly data' | ||
git push --force |
Oops, something went wrong.