Fix a CI deploy step that refused to read and exited 1
A proofline ci deploy step exits 1 when it cannot tell which deploy to read, or when the deploy it would read cannot be recorded yet. The last line of the step's log starts with proofline: and names the reason. Change the step as the matching section says, then run it again. A refused sign-in also exits 1: see Restore GitHub Actions sign-in for a Proofline step.
The step reads its own run#
The log ends with "Proofline records the landing of a run's deploy only after the run completes."
Proofline records a deploy's landing only after the GitHub Actions run that deployed it completes. A step inside that run would wait for a record that cannot arrive while it runs. The step refuses before its first read when its --run names its own run, and after a read when a deploy of its own run is still waiting for its check.
Move the step into a workflow that starts when the deploying workflow completes:
name: Proofline deploy checks
on:
workflow_run:
workflows: [Deploy]
types: [completed]
permissions:
id-token: write
jobs:
checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: curl -fsSL https://proofline.sh/cli | sh
- run: ~/.local/bin/proofline ci deploy --environment production --until 1h
On workflow_run, the step reads the completed run's commit, run and attempt from the event. Read the checks from a separate workflow shows the full workflow, which also skips attempts that made no deploy. To read a check that comes due later, see Read a deploy's hour or day check from a later pipeline run.
The commit has deploys in more than one environment#
The log ends with "Proofline recorded deploys of this commit in more than one Proofline environment."
The step was given no filter that selects a deploy, and Proofline recorded the commit's deploys in several Proofline environments, such as staging and production. The step cannot choose one for you. A regression in any of them still ends the step with exit code 3 instead.
Add one of these options to name the deploy the step should judge:
--environment NAMEfor the GitHub Environment the deploy job used.--environment-id UUIDfor the Proofline environment.--aws-run IDfor a CodePipeline execution or Amplify job.--deployment IDfor a GitHub deployment.--run IDfor the GitHub Actions run that deployed.
proofline ci deploy --environment production --until 1h
If the step then exits 2, no recorded deploy matches the filter: see Find the deploy a CI deploy step could not match.
The step cannot read the run it follows#
The last line of the log starts with "proofline: the workflow_run event payload names no completed run".
On a workflow_run event, a step that leaves out the commit or the run reads them from the event payload the runner wrote. The refusal means the step could not read that file or found no completed run in it, as happens in a container that does not mount the runner's event file.
Name the deploy on the command line so the step needs no payload. Pass the deploy's full commit with --commit and select it with --deployment or --aws-run. For a GitHub Actions deploy without a deployment ID, pass --commit with --run, and --attempt to select that attempt's deploy:
- 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 --commit "$DEPLOYED_SHA" \
--run "$DEPLOY_RUN" --attempt "$DEPLOY_ATTEMPT" --until 1h
For command options and exit codes, see the CI reference.