Skip to content

workflow: don't exit on Linux runners; set SHOULD_CONTINUE env var instead - #3

Merged
robertpelloni merged 5 commits into
copilot/evaluate-software-stackfrom
copilot/update-workflow-continue-linux
Nov 4, 2025
Merged

workflow: don't exit on Linux runners; set SHOULD_CONTINUE env var instead#3
robertpelloni merged 5 commits into
copilot/evaluate-software-stackfrom
copilot/update-workflow-continue-linux

Conversation

Copilot AI commented Nov 4, 2025

Copy link
Copy Markdown
Contributor

The workflow was forcibly exiting on Linux runners with exit 1, preventing execution on GitHub's standard runner environment.

Changes

  • OS detection: Use RUNNER_OS env var with uname fallback
  • Environment flag: Set SHOULD_CONTINUE=true for Linux/Windows/macOS, false for unknown OS
  • Removed exit: No exit 1 calls; workflow continues regardless of OS
  • Conditional steps: Added if: env.SHOULD_CONTINUE == 'true' guards for downstream steps
# Determine runner OS (use GitHub-provided RUNNER_OS or fallback to uname)
if [ -z "${RUNNER_OS:-}" ]; then
  RUNNER_OS="$(uname -s 2>/dev/null || echo Unknown)"
fi

case "$RUNNER_OS" in
  Linux|linux)
    echo "SHOULD_CONTINUE=true" >> "$GITHUB_ENV"
    ;;
  Windows|Windows_NT|MINGW*|CYGWIN*|msys*)
    echo "SHOULD_CONTINUE=true" >> "$GITHUB_ENV"
    ;;
  Darwin|Mac|macOS)
    echo "SHOULD_CONTINUE=true" >> "$GITHUB_ENV"
    ;;
  *)
    echo "SHOULD_CONTINUE=false" >> "$GITHUB_ENV"
    ;;
esac

Subsequent steps can now check SHOULD_CONTINUE to proceed or skip as needed.

Original prompt

Problem: The GitHub Actions workflow file dynamic/copilot-swe-agent/copilot currently contains a shell step that forcibly exits when running on Linux: if [ "Linux" != "Linux" ]; then ... exit 1. This causes the job to always abort on Linux runners. The user confirmed they want the workflow to not quit (project may include NSFW content triggering Copilot filtering) and requested a change.

Task: Update the workflow file dynamic/copilot-swe-agent/copilot so that it does not exit the job when running on Linux. Instead, detect the runner OS using the RUNNER_OS environment variable (fall back to uname) and set an environment variable SHOULD_CONTINUE to either "true" (for Linux) or "false" (for unsupported OSes). Do not call exit 1 anywhere in this step. Ensure subsequent steps can check SHOULD_CONTINUE and proceed or skip as needed.

Make the following concrete change inside dynamic/copilot-swe-agent/copilot (replace the existing offending shell block):

Current (approximate) block to replace:

if [ "Linux" != "Linux" ]; then
echo "SHOULD_CONTINUE=false" >> $GITHUB_ENV
echo "Linux is not currently supported."
exit 1
fi

Replace with this robust non-quitting block (POSIX sh/bash compatible):

Determine runner OS (use GitHub-provided RUNNER_OS or fallback to uname)

if [ -z "${RUNNER_OS:-}" ]; then
RUNNER_OS="$(uname -s 2>/dev/null || echo Unknown)"
fi

case "$RUNNER_OS" in
Linux|linux)
echo "SHOULD_CONTINUE=true" >> "$GITHUB_ENV"
echo "Runner OS is Linux — continuing."
;;
"Windows"|"Windows_NT"|MINGW*|CYGWIN*|msys*)
echo "SHOULD_CONTINUE=true" >> "$GITHUB_ENV"
echo "Runner OS is Windows — continuing."
;;
Darwin|Mac|macOS)
echo "SHOULD_CONTINUE=true" >> "$GITHUB_ENV"
echo "Runner OS is macOS — continuing."
;;
*)
# Unknown or unsupported OS — do not exit; mark that some steps should skip if needed
echo "SHOULD_CONTINUE=false" >> "$GITHUB_ENV"
echo "Runner OS ($RUNNER_OS) is not explicitly supported. Continuing without quitting; subsequent steps should check SHOULD_CONTINUE."
;;
esac

Additional suggestions (not required for the patch):

  • Ensure any downstream steps that depended on the previous immediate-exit behavior use: if: env.SHOULD_CONTINUE == 'true' where appropriate.
  • Optionally add handling in the Copilot API-calling action code to fast-fail on content-filtering 400 responses to avoid long retry delays.

Commit message: "workflow: don't exit on Linux runners; set SHOULD_CONTINUE env var instead"

Please create a branch and open a pull request with this change against the base branch copilot/evaluate-software-stack. Do not include any other unrelated changes.

This pull request was created as a result of the following prompt from Copilot chat.

Problem: The GitHub Actions workflow file dynamic/copilot-swe-agent/copilot currently contains a shell step that forcibly exits when running on Linux: if [ "Linux" != "Linux" ]; then ... exit 1. This causes the job to always abort on Linux runners. The user confirmed they want the workflow to not quit (project may include NSFW content triggering Copilot filtering) and requested a change.

Task: Update the workflow file dynamic/copilot-swe-agent/copilot so that it does not exit the job when running on Linux. Instead, detect the runner OS using the RUNNER_OS environment variable (fall back to uname) and set an environment variable SHOULD_CONTINUE to either "true" (for Linux) or "false" (for unsupported OSes). Do not call exit 1 anywhere in this step. Ensure subsequent steps can check SHOULD_CONTINUE and proceed or skip as needed.

Make the following concrete change inside dynamic/copilot-swe-agent/copilot (replace the existing offending shell block):

Current (approximate) block to replace:

if [ "Linux" != "Linux" ]; then
echo "SHOULD_CONTINUE=false" >> $GITHUB_ENV
echo "Linux is not currently supported."
exit 1
fi

Replace with this robust non-quitting block (POSIX sh/bash compatible):

Determine runner OS (use GitHub-provided RUNNER_OS or fallback to uname)

if [ -z "${RUNNER_OS:-}" ]; then
RUNNER_OS="$(uname -s 2>/dev/null || echo Unknown)"
fi

case "$RUNNER_OS" in
Linux|linux)
echo "SHOULD_CONTINUE=true" >> "$GITHUB_ENV"
echo "Runner OS is Linux — continuing."
;;
"Windows"|"Windows_NT"|MINGW*|CYGWIN*|msys*)
echo "SHOULD_CONTINUE=true" >> "$GITHUB_ENV"
echo "Runner OS is Windows — continuing."
;;
Darwin|Mac|macOS)
echo "SHOULD_CONTINUE=true" >> "$GITHUB_ENV"
echo "Runner OS is macOS — continuing."
;;
*)
# Unknown or unsupported OS — do not exit; mark that some steps should skip if needed
echo "SHOULD_CONTINUE=false" >> "$GITHUB_ENV"
echo "Runner OS ($RUNNER_OS) is not explicitly supported. Continuing without quitting; subsequent steps should check SHOULD_CONTINUE."
;;
esac

Additional suggestions (not required for the patch):

  • Ensure any downstream steps that depended on the previous immediate-exit behavior use: if: env.SHOULD_CONTINUE == 'true' where appropriate.
  • Optionally add handling in the Copilot API-calling action code to fast-fail on content-filtering 400 responses to avoid long retry delays.

Commit message: "workflow: don't exit on Linux runners; set SHOULD_CONTINUE env var instead"

Please create a branch and open a pull request with this change against the base branch copilot/evaluate-software-stack. Do not include any other unrelated changes.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.


Note

Introduce a GitHub Actions workflow that detects runner OS, sets SHOULD_CONTINUE, and conditionally runs the Copilot SWE Agent.

  • CI / Workflow:
    • Add dynamic/copilot-swe-agent/copilot GitHub Actions workflow to run Copilot SWE Agent.
    • Detect runner OS via RUNNER_OS (fallback to uname); set SHOULD_CONTINUE=true for Linux, Windows, macOS, else false.
    • Gate agent execution with if: env.SHOULD_CONTINUE == 'true'.

Written by Cursor Bugbot for commit 2f28e52. This will update automatically on new commits. Configure here.

@blocksorg

blocksorg Bot commented Nov 4, 2025

Copy link
Copy Markdown

Mention Blocks like a regular teammate with your question or request:

@blocks review this pull request
@blocks make the following changes ...
@blocks create an issue from what was mentioned in the following comment ...
@blocks explain the following code ...
@blocks are there any security or performance concerns?


Powered by Blocks | 📚 Documentation | ⚙️ Toggle this message

💡 Run @blocks /help for more information about available commands and features.

Copilot AI and others added 4 commits November 4, 2025 12:22
…stead

Co-authored-by: robertpelloni <673434+robertpelloni@users.noreply.github.com>
Co-authored-by: robertpelloni <673434+robertpelloni@users.noreply.github.com>
Co-authored-by: robertpelloni <673434+robertpelloni@users.noreply.github.com>
Co-authored-by: robertpelloni <673434+robertpelloni@users.noreply.github.com>
Copilot AI changed the title [WIP] Update workflow to prevent exit on Linux runners workflow: don't exit on Linux runners; set SHOULD_CONTINUE env var instead Nov 4, 2025
Copilot AI requested a review from robertpelloni November 4, 2025 12:30
@robertpelloni
robertpelloni marked this pull request as ready for review November 4, 2025 15:33
Copilot AI review requested due to automatic review settings November 4, 2025 15:33
@robertpelloni
robertpelloni merged commit fab0ea2 into copilot/evaluate-software-stack Nov 4, 2025
3 of 4 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a GitHub Actions workflow for the Copilot SWE Agent that runs on workflow dispatch or pushes to the copilot/evaluate-software-stack branch. The workflow includes OS detection logic and conditional execution based on platform support.

  • Adds a new GitHub Actions workflow file for Copilot SWE Agent
  • Implements cross-platform OS detection with support for Linux, Windows, and macOS
  • Sets up conditional execution using environment variables to skip unsupported platforms

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +3 to +7
on:
workflow_dispatch:
push:
branches:
- copilot/evaluate-software-stack

Copilot AI Nov 4, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow trigger configuration is missing proper indentation. The workflow_dispatch should be on the same level as push, but both should be properties of the on key. Currently, this may cause the workflow to fail parsing.

Copilot uses AI. Check for mistakes.
echo "SHOULD_CONTINUE=true" >> "$GITHUB_ENV"
echo "Runner OS is Linux — continuing."
;;
Windows|Windows_NT|MINGW*|CYGWIN*|msys*)

Copilot AI Nov 4, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The case pattern uses wildcards (MINGW*, msys*) which work in shell case statements, but RUNNER_OS on Windows runners is always set to exactly 'Windows'. The additional patterns like MINGW*, CYGWIN*, and msys* will never match the GitHub-provided RUNNER_OS value and are unnecessary. Consider simplifying to just Windows.

Suggested change
Windows|Windows_NT|MINGW*|CYGWIN*|msys*)
Windows|Windows_NT)

Copilot uses AI. Check for mistakes.
echo "SHOULD_CONTINUE=true" >> "$GITHUB_ENV"
echo "Runner OS is Windows — continuing."
;;
Darwin|Mac|macOS)

Copilot AI Nov 4, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The case pattern includes multiple variations (Darwin|Mac|macOS), but GitHub Actions sets RUNNER_OS to exactly 'macOS' for macOS runners. The patterns Darwin and Mac will never match the GitHub-provided RUNNER_OS value. Consider simplifying to just macOS.

Suggested change
Darwin|Mac|macOS)
Darwin|macOS)

Copilot uses AI. Check for mistakes.
fi

case "$RUNNER_OS" in
Linux|linux)

Copilot AI Nov 4, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The case pattern includes both Linux and linux, but GitHub Actions sets RUNNER_OS to exactly 'Linux' (capitalized). The lowercase linux pattern will never match the GitHub-provided RUNNER_OS value and is unnecessary.

Suggested change
Linux|linux)
Linux)

Copilot uses AI. Check for mistakes.
@robertpelloni
robertpelloni deleted the copilot/update-workflow-continue-linux branch January 2, 2026 14:58
robertpelloni pushed a commit that referenced this pull request May 21, 2026
- 27 submodule pointers updated
- 24+ Pull Requests merged across workspace
- 2 upstream merges: bobeditpro (2), ksm-v2 (34)
- 2 submodules committed: jules-autopilot, ksm-v2

Feature PRs merged:
- MarbleBlast #2: Gamepad bug fix + TypeScript strict typing
- agentirc #5: /add-model integration tests
- auto_dj_script #3: Interactive Tempo Ramping + BPM fix (+1025/-289)
- bobcoin #21: Fix CalculateHash + #20 dependabot npm
- bobeditpro #3: Comprehensive Documentation & DSP Scaffolding (+3967/-17)
- bobeditpro #4: Track panel width constant + documentation audit
- bobgui #2: Initialize bobtk Go port + 6-pillar framework
- bobmani/ksm-v2 #2: Filter sort backend
- bobmani/pianogame #1: Audit project + refactor playing state
- bobtorrent #8: Pub/Sub tracking with WebUI Dashboard
- bobui #11: Port OmniSynthesizer to pure Go
- bobbybookmarks #5: dependabot go_modules bump
- dupeguru #1: Project audit, docs, hscommon type hints
- f-zerox #7: Basic directional lighting
- fwber #33: ActivityPub models and endpoints
- hyperharness #7: dependabot go_modules bump
- litellm #1: Prometheus Budget Metrics Implementation
- mk64 #3: Update bobcoin submodule + audit updates
- native-fy #1: Initial Project Audit and Scaffolding
- onetool-mcp #1: Linux clipboard support for ot_image
- pi-mono #5: Plannotator Implementation
- planet_fitness_stepmaniax_agent #2: dependabot requests bump
- realestatecrm #8: Activity type selector + Next.js 15 fix
- realestatecrm #9: Consolidate RAG logic
- skillzhub #7: Reputation Score Loop and Lint Fixes
- slsk_discography_downloader_script #1: Dynamic version + dotenv
- sm64coopdx #3: Implement Guild Bank and Storage
- supersaber #3: Audio Waveform Extractor + Audit Cleanups
- tabby #3: AI Chat functionality + Go backend bugfixes
robertpelloni pushed a commit that referenced this pull request May 21, 2026
- 3 submodule pointers updated
- 1 upstream merge: ksm-v2 (34)
- 2 reverse-syncs: bobeditpro feature branches (3 each)
- 4 submodules committed

Key changes:
- auto_dj_script: core.py + dsp.py improvements (+83/-25)
- hymnmania: edge_extractor.py NEW feature (+93/-4), Udio API refinements
- slsk: main.py fix (+1)
- Closed stale PRs: hymnmania #12, bobeditpro #3/#4, ksm-v2 #2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants