Read a deploy's hour or day check from a later pipeline run

A deploy's 1-hour and 1-day checks come due long after the deploy job could reasonably wait. A job on a GitHub-hosted runner is stopped after six hours, before the day check is due. Read the landing or 20-minute check from a workflow that starts when the deploying workflow completes. A separate run can read the hour or day check once it is due.

When each check comes due#

Proofline checks a deploy four times, each after a window measured from when the deploy landed:

Check--untilComes due
At landinglanding5 minutes after landing
20 min20m20 minutes after landing
1 hour1h1 hour after landing
1 day1d1 day after landing

Each check records its result a few minutes after it comes due, and later when it has to wait for the runtime it reads to settle. Compare landing and follow-up verification windows explains what each check reads.

Without --timeout, a step that waits for --until 20m or --until 1h waits until that check is due, and at least 30 minutes. An explicit --timeout counts from when the step starts, not from landing. Either way, a step that waits for --until 1h right after the deploy holds its runner for that hour.

See which checks are still to be recorded#

  1. Open Environments and select the environment.
  2. Select Deploys in the environment sidebar. A deploy whose later checks are not due yet reads Checking.
  3. Open the deploy. Its page shows when it landed.

Under Checks, a check without a result reads Pending while verification goes on, or Not recorded once verification has ended. The step's log names the same check as NOT_RECORDED, with the deploy's page at the end of each line.

Read the timeout message#

When --timeout passes before the check is recorded, the step ends with exit code 2 and this line:

The DAY_1 check was not recorded after 60 minutes. The result is not established.

The message says only that the check was not recorded within the wait. It is never a result about the deploy, and the pipeline should not treat it as success. A later read of the same deploy gets the check once Proofline records it, since recorded checks do not change.

Read the 20-minute check after the deploying workflow completes#

Proofline waits up to two hours for the deploying run to finish before recording its landing, so a step that waits inside that run holds up its own check. Put this reader on the default branch and replace Deploy with the name of your deploying workflow.

on:
  workflow_run:
    workflows: [Deploy]
    types: [completed]
permissions:
  id-token: write
jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - run: curl -fsSL https://proofline.sh/cli | sh
      - env:
          DEPLOYED_SHA: ${{ github.event.workflow_run.head_sha }}
          DEPLOY_RUN: ${{ github.event.workflow_run.id }}
          DEPLOY_ATTEMPT: ${{ github.event.workflow_run.run_attempt }}
        run: |
          ~/.local/bin/proofline ci deploy --repo "$GITHUB_REPOSITORY" \
            --commit "$DEPLOYED_SHA" --run "$DEPLOY_RUN" --attempt "$DEPLOY_ATTEMPT" \
            --environment production --until 20m

This example reads a workflow that deployed its head commit. If your workflow deployed a different commit, pass that exact SHA instead.

Read the day check from a later run#

A later run reads the same deploy by naming its commit, run and attempt. It can be a manually dispatched workflow, or a scheduled one that supplies the same values from wherever the pipeline records them. Start it a day after the deploy landed, so a short --timeout covers the minutes the check takes to record:

on:
  workflow_dispatch:
    inputs:
      commit:
        description: Full SHA the deploy job deployed
        required: true
      run:
        description: Run ID of the deploying workflow
        required: true
      attempt:
        description: Attempt of the deploying workflow run
        required: true
permissions:
  id-token: write
jobs:
  day-check:
    runs-on: ubuntu-latest
    steps:
      - run: curl -fsSL https://proofline.sh/cli | sh
      - env:
          DEPLOYED_SHA: ${{ inputs.commit }}
          DEPLOY_RUN: ${{ inputs.run }}
          DEPLOY_ATTEMPT: ${{ inputs.attempt }}
        run: |
          ~/.local/bin/proofline ci deploy --repo "$GITHUB_REPOSITORY" \
            --commit "$DEPLOYED_SHA" --run "$DEPLOY_RUN" --attempt "$DEPLOY_ATTEMPT" \
            --environment production --until 1d --timeout 60

The later job has no checkout, so it names the repository with --repo. Pass --commit and --run every time: without --commit the command reads the later run's own commit, and --run never defaults to the reading job's run. The same job reads the 1-hour check with --until 1h. A regression that an earlier check recorded ends the step at once with exit code 3.

Make sure the later run can authenticate#

A GitHub Actions job with id-token: write exchanges its run's OIDC token for access. The exchange acts for the person whose action started the run: whoever dispatched it, or the person GitHub records as the actor of a scheduled run. That person must be a member of the organization in Proofline, or the exchange is refused and the step exits 1. A run that should not depend on one person can set PROOFLINE_TOKEN and PROOFLINE_ORGANIZATION_ID from repository secrets instead, with an organization token that holds reviews:read for the repository.

For command options, see the CI reference.

Search help

Tab to a result. Enter to open. Escape to close.