Countme tracker #4
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: Countme tracker | |
| # Refreshes the site's /status "Devices running Margine" chart from | |
| # Fedora's public Count Me dataset (see publish-countme-json.sh for the | |
| # counting model). Fedora's weeks close on Sunday and the published | |
| # totals settle a day or two later, hence the Tuesday cron. Same | |
| # SITE_BUMP_TOKEN publish pattern as status-json.yml. | |
| on: | |
| schedule: | |
| - cron: "43 7 * * 2" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: countme-tracker | |
| cancel-in-progress: true | |
| jobs: | |
| refresh: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout margine-image (producer script) | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 1 | |
| - name: Check SITE_BUMP_TOKEN | |
| id: tok | |
| env: | |
| T: ${{ secrets.SITE_BUMP_TOKEN }} | |
| run: | | |
| if [ -z "$T" ]; then | |
| echo "skip=true" >> "$GITHUB_OUTPUT" | |
| echo "::warning::SITE_BUMP_TOKEN not set — cannot publish countme.json." | |
| else | |
| echo "skip=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Checkout website repo | |
| if: steps.tok.outputs.skip != 'true' | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| repository: daniel-g-carrasco/margine-os-1084ca72 | |
| token: ${{ secrets.SITE_BUMP_TOKEN }} | |
| path: site | |
| fetch-depth: 1 | |
| - name: Refresh + publish countme.json | |
| if: steps.tok.outputs.skip != 'true' | |
| working-directory: site | |
| run: ../.github/scripts/publish-countme-json.sh |