Update Status #75
This file contains hidden or 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
| name: Update Status | |
| on: | |
| schedule: | |
| - cron: '0 4 * * *' # 4 AM UTC daily (2 hours after test-plans runs at 2 AM) | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| update-status: | |
| runs-on: self-hosted | |
| outputs: | |
| changes_committed: ${{ steps.commit.outputs.changes_committed }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Create status data directory | |
| run: mkdir -p static/data/status | |
| - name: Fetch interop results from Filebase | |
| run: | | |
| set -euo pipefail | |
| FILEBASE_URL="https://results.s3.filebase.com/results.yaml" | |
| echo "Fetching combined interop results from ${FILEBASE_URL}..." | |
| # Fetch the combined YAML file | |
| if curl -fsSL "${FILEBASE_URL}" -o static/data/status/interop-results.yml; then | |
| echo "✓ Downloaded interop-results.yml" | |
| else | |
| echo "✗ Failed to download interop-results.yml from Filebase" | |
| # Create a minimal placeholder file so the site still builds | |
| { | |
| echo '# Placeholder - results not yet available' | |
| echo 'generated-at: null' | |
| echo 'workflow-run: null' | |
| echo 'transport: null' | |
| echo 'hole-punch: null' | |
| echo 'perf: null' | |
| echo 'box-plots:' | |
| echo ' upload: null' | |
| echo ' download: null' | |
| echo ' latency: null' | |
| } > static/data/status/interop-results.yml | |
| fi | |
| - name: Validate YAML | |
| run: | | |
| python3 -c "import yaml; yaml.safe_load(open('static/data/status/interop-results.yml'))" && \ | |
| echo "✓ YAML validation passed" || \ | |
| echo "✗ YAML validation failed" | |
| - name: Generate status content pages | |
| run: ./generate-status-pages.sh | |
| - name: Commit and push if changed | |
| id: commit | |
| run: | | |
| set -euo pipefail | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| # Stage all status data and generated content files | |
| git add static/data/status/ content/status/ | |
| # Check if there are changes | |
| if git diff --cached --quiet; then | |
| echo "→ No changes to commit" | |
| echo "changes_committed=false" >> $GITHUB_OUTPUT | |
| exit 0 | |
| fi | |
| # Get timestamp from results file if available | |
| GENERATED_AT=$(grep -oP 'generated-at: "\K[^"]+' static/data/status/interop-results.yml 2>/dev/null || echo "unknown") | |
| git commit -m "chore: update interop status data [skip ci]" \ | |
| -m "Results from: $GENERATED_AT" \ | |
| -m "Source: https://results.s3.filebase.com/results.yaml" | |
| git push origin main | |
| echo "✓ Changes committed and pushed" | |
| echo "changes_committed=true" >> $GITHUB_OUTPUT |