Instrument Status Check #19
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: Instrument Status Check | |
| on: | |
| schedule: | |
| - cron: '0 6 * * 1' # Monday 06:00 UTC | |
| workflow_dispatch: # manual trigger | |
| concurrency: | |
| group: instrument-status | |
| cancel-in-progress: true | |
| permissions: | |
| contents: write | |
| jobs: | |
| check-instruments: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 120 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install package | |
| run: pip install -e . | |
| - name: Run instrument status checks | |
| id: check | |
| run: | | |
| python tiptop_ipy/ci/check_server_status.py --output-dir status --server https://tiptop.univie.ac.at/api | |
| echo "status_exit_code=$?" >> "$GITHUB_OUTPUT" | |
| continue-on-error: true | |
| - name: Commit status updates | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add status/ | |
| git diff --cached --quiet && echo "No changes to commit" && exit 0 | |
| git commit -m "Update instrument status badges [skip ci]" | |
| git push | |
| - name: Fail on new regressions | |
| if: steps.check.outcome == 'failure' | |
| run: exit 1 |