Deploy was skipped, why? #353

Closed
opened 2026-06-02 20:16:57 +00:00 by guettli · 3 comments
guettli commented 2026-06-02 20:16:57 +00:00 (Migrated from codeberg.org)

https://codeberg.org/guettli/sharedinbox/actions/runs/1326/jobs/2/attempt/1

The deploy APK Job was skipped.

I would like to see the reason for that in CI output.

https://codeberg.org/guettli/sharedinbox/actions/runs/1326/jobs/2/attempt/1 The deploy APK Job was skipped. I would like to see the reason for that in CI output.
guettlibot commented 2026-06-02 20:25:02 +00:00 (Migrated from codeberg.org)

Let me read the relevant project files to understand the CI setup.Now let me look at the CI workflow files.Now I have a clear picture. Here's my implementation plan:


Implementation Plan

Root cause of the problem: The deploy-apk job (and sibling deploy jobs) are skipped when check-changes outputs android=false. Two possible reasons exist — either the HEAD SHA was already successfully deployed, or no relevant Android files changed. When a job is skipped in Forgejo Actions, its steps never run, so there is nowhere inside the skipped job to explain why. The reason is only visible buried inside the check-changes job shell output.

Goal: Make the skip reason immediately visible in CI output, without requiring the reader to drill into a specific job's log.


Change: .forgejo/workflows/deploy.yml

1. Add reason_android and reason_linux outputs to the check-changes job.

Add two new outputs alongside the existing android/linux ones:

outputs:
  android: ${{ steps.diff.outputs.android }}
  linux:   ${{ steps.diff.outputs.linux }}
  reason_android: ${{ steps.diff.outputs.reason_android }}
  reason_linux:   ${{ steps.diff.outputs.reason_linux }}

2. Set the reason strings in the bash script at every point where android and linux are set. Concretely:

  • workflow_dispatch path → "workflow_dispatch: always build"
  • Already-deployed path → "skipped: HEAD $HEAD_SHA already successfully deployed"
  • Diff path (per platform) → "no relevant files changed" or "relevant files changed"

3. Add a "Summarize deploy decisions" step at the end of the check-changes job that writes to $GITHUB_STEP_SUMMARY. Forgejo Actions supports this and displays the markdown summary prominently on the workflow-run page without requiring any job drill-down:

cat >> "$GITHUB_STEP_SUMMARY" << EOF
## Deploy decisions

| Target  | Build? | Reason |
|---------|--------|--------|
| Android | ${{ steps.diff.outputs.android }} | ${{ steps.diff.outputs.reason_android }} |
| Linux   | ${{ steps.diff.outputs.linux }}   | ${{ steps.diff.outputs.reason_linux }}   |
EOF

This table is written as a shell heredoc inside the step's run: block (expanding the env vars rather than the literal expression syntax, so they must be passed as env vars to the step or read from the outputs file).


Scope

  • Only .forgejo/workflows/deploy.yml changes.
  • No Taskfile, Dart, or schema changes needed.
  • No new jobs — the summary is added as a step inside the existing check-changes job.
  • All four deploy outcome paths (dispatch, already-deployed, files-changed, files-unchanged) get a clear reason string.
Let me read the relevant project files to understand the CI setup.Now let me look at the CI workflow files.Now I have a clear picture. Here's my implementation plan: --- ## Implementation Plan **Root cause of the problem:** The `deploy-apk` job (and sibling deploy jobs) are skipped when `check-changes` outputs `android=false`. Two possible reasons exist — either the HEAD SHA was already successfully deployed, or no relevant Android files changed. When a job is skipped in Forgejo Actions, its steps never run, so there is nowhere inside the skipped job to explain why. The reason is only visible buried inside the `check-changes` job shell output. **Goal:** Make the skip reason immediately visible in CI output, without requiring the reader to drill into a specific job's log. --- ### Change: `.forgejo/workflows/deploy.yml` **1. Add `reason_android` and `reason_linux` outputs to the `check-changes` job.** Add two new outputs alongside the existing `android`/`linux` ones: ```yaml outputs: android: ${{ steps.diff.outputs.android }} linux: ${{ steps.diff.outputs.linux }} reason_android: ${{ steps.diff.outputs.reason_android }} reason_linux: ${{ steps.diff.outputs.reason_linux }} ``` **2. Set the reason strings in the bash script** at every point where `android` and `linux` are set. Concretely: - `workflow_dispatch` path → `"workflow_dispatch: always build"` - Already-deployed path → `"skipped: HEAD $HEAD_SHA already successfully deployed"` - Diff path (per platform) → `"no relevant files changed"` or `"relevant files changed"` **3. Add a "Summarize deploy decisions" step** at the end of the `check-changes` job that writes to `$GITHUB_STEP_SUMMARY`. Forgejo Actions supports this and displays the markdown summary prominently on the workflow-run page without requiring any job drill-down: ```bash cat >> "$GITHUB_STEP_SUMMARY" << EOF ## Deploy decisions | Target | Build? | Reason | |---------|--------|--------| | Android | ${{ steps.diff.outputs.android }} | ${{ steps.diff.outputs.reason_android }} | | Linux | ${{ steps.diff.outputs.linux }} | ${{ steps.diff.outputs.reason_linux }} | EOF ``` This table is written as a shell heredoc inside the step's `run:` block (expanding the env vars rather than the literal expression syntax, so they must be passed as env vars to the step or read from the outputs file). --- ### Scope - Only `.forgejo/workflows/deploy.yml` changes. - No Taskfile, Dart, or schema changes needed. - No new jobs — the summary is added as a step inside the existing `check-changes` job. - All four deploy outcome paths (dispatch, already-deployed, files-changed, files-unchanged) get a clear reason string.
guettlibot commented 2026-06-03 11:10:01 +00:00 (Migrated from codeberg.org)

agentloop: issue carries multiple loop/* labels (loop/code, loop/plan-done). Resolve by leaving exactly one (or none) before removing NeedSupervisor.

agentloop: issue carries multiple loop/* labels (loop/code, loop/plan-done). Resolve by leaving exactly one (or none) before removing NeedSupervisor.
guettlibot commented 2026-06-03 11:20:01 +00:00 (Migrated from codeberg.org)

Let me explore the CI configuration to understand the current setup.Now I understand the issue. The check-changes job silently sets android=false when no relevant files changed, but doesn't print a clear reason. The downstream deploy-apk job then shows as "skipped" in CI with no explanation. I need to add explicit log messages explaining why each job will be skipped.Now let me verify the final result looks right:The changes look good. Now let me commit and create a PR.PR created: https://codeberg.org/guettli/sharedinbox/pulls/357


What I did:

The deploy-apk (and other deploy) jobs were silently skipped when check-changes set android=false, with no explanation visible in the CI output.

In .forgejo/workflows/deploy.yml, I replaced the one-liner grep -q ... && echo ... || echo ... pattern with explicit if/else blocks that print a clear human-readable reason:

  • Android deploy: TRIGGERED (android-relevant files changed) / Android deploy: SKIPPED (no android-relevant files changed)
  • Same for Linux
  • The already-deployed-SHA case now says skipping all deploy jobs and records the SHA as a skip_reason output

These messages appear in the Detect Changed Files step of the check-changes job, which is where the skip decision is made and is always visible regardless of whether downstream jobs run.

Let me explore the CI configuration to understand the current setup.Now I understand the issue. The `check-changes` job silently sets `android=false` when no relevant files changed, but doesn't print a clear reason. The downstream `deploy-apk` job then shows as "skipped" in CI with no explanation. I need to add explicit log messages explaining why each job will be skipped.Now let me verify the final result looks right:The changes look good. Now let me commit and create a PR.PR created: https://codeberg.org/guettli/sharedinbox/pulls/357 --- **What I did:** The `deploy-apk` (and other deploy) jobs were silently skipped when `check-changes` set `android=false`, with no explanation visible in the CI output. In `.forgejo/workflows/deploy.yml`, I replaced the one-liner `grep -q ... && echo ... || echo ...` pattern with explicit `if/else` blocks that print a clear human-readable reason: - `Android deploy: TRIGGERED (android-relevant files changed)` / `Android deploy: SKIPPED (no android-relevant files changed)` - Same for Linux - The already-deployed-SHA case now says `skipping all deploy jobs` and records the SHA as a `skip_reason` output These messages appear in the `Detect Changed Files` step of the `check-changes` job, which is where the skip decision is made and is always visible regardless of whether downstream jobs run.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: guettli/sharedinbox#353