Skip to content

CI broken since Aug 20: duplicate top-level env in ci.yml, ios-testflight.yml, windows-smoke.yml (Invalid workflow file) #1191

Description

@ra-co88

Summary

Every GitHub Actions run on master (and all feature branches) fails instantly with:

Invalid workflow file
.github/workflows/ci.yml
(Line: 18, Col: 1): 'env' is already defined

The same error affects ios-testflight.yml (line 18) and windows-smoke.yml (line 23). All three workflows have two top-level env: blocks, which GitHub Actions rejects as a duplicate mapping key. Runs show 0s duration — nothing executes.

Root cause

Commit e644e42 ("Mark CI telemetry explicitly", Aug 20) prepended a new top-level block:

name: CI

env:
  JCODE_CI: "1"

on:
  ...

to ci.yml, ios-testflight.yml, and windows-smoke.yml, each of which already had a top-level env: block further down (e.g. CARGO_TERM_COLOR / BUNDLE_ID / SCHEME / TEAM_ID). Every push since Aug 20 has had zero CI.

Consequences beyond the parse failure itself: with CI unable to run, unformatted code has also landed on master — cargo fmt --check currently fails on crates/jcode-tui/src/tui/app/input.rs:2931 and crates/jcode-tui/src/tui/ui_header.rs:850 (from the recent SSH feature wave).

Evidence

  • gh run list on this repo: every run since e644e42 completed in 0s with "Invalid workflow file"
  • Current master still has both blocks: grep -n '^env:' .github/workflows/ci.yml → lines 3 and 16

Fix

Fold JCODE_CI: "1" into each file's existing env: block (one block per file, semantics unchanged — top-level env is a flat map). A PR follows with the three-line fix. The formatting fallout can be a separate cargo fmt commit.

Found while syncing the ra-co88/jcode fork, whose CI hit the same parse failure.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    autonomous: clearHands-off: unambiguous bug, obvious fix, no decisions. Don't even look - an agent can fully solve.bugSomething isn't workingtriage: reproducibleClear repro + clear fix path

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions