Runner Heartbeat #10
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: Runner Heartbeat | |
| # Change to trigger push | |
| on: | |
| schedule: | |
| - cron: "0 1 * * 0" # every Sunday at 1AM UTC | |
| workflow_dispatch: | |
| permissions: | |
| actions: write # Required to upload artifacts | |
| jobs: | |
| heartbeat: | |
| strategy: | |
| matrix: | |
| runner: | |
| - xsjevo04 | |
| fail-fast: false # Continue even if one runner fails | |
| runs-on: [self-hosted, "${{ matrix.runner }}"] | |
| steps: | |
| - name: Create heartbeat file (Windows) | |
| if: runner.os == 'Windows' | |
| shell: powershell | |
| run: | | |
| $timestamp = Get-Date -Format "yyyy-MM-ddTHH:mm:ssK" | |
| $runner = "${{ runner.name }}" | |
| "$timestamp" | Out-File -FilePath "heartbeat-$runner.txt" -Encoding utf8 | |
| - name: Create heartbeat file (Linux) | |
| if: runner.os == 'Linux' | |
| shell: bash | |
| run: | | |
| timestamp=$(date -Iseconds) | |
| runner="${{ runner.name }}" | |
| echo "$timestamp" > "heartbeat-$runner.txt" | |
| - name: Upload heartbeat artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: heartbeat-${{ runner.name }} | |
| path: heartbeat-${{ runner.name }}.txt | |
| retention-days: 14 |