Skip to content

fix: use RUNNER_ENVIRONMENT to keep setup-php on the prebuilt path - #48

Closed
Florian Ruppel (fruppel) wants to merge 1 commit into
mainfrom
fix/setup-php-self-hosted-runner-detection
Closed

fix: use RUNNER_ENVIRONMENT to keep setup-php on the prebuilt path#48
Florian Ruppel (fruppel) wants to merge 1 commit into
mainfrom
fix/setup-php-self-hosted-runner-detection

Conversation

@fruppel

Copy link
Copy Markdown

setup-php 2.37 rejects a forced RUNNER=github when it detects a self-hosted environment and exits 1 with "Runner set as github in self-hosted environment". Since our runs-on runners report RUNNER_ENVIRONMENT=self-hosted, every job using this action broke when the pin moved from 2.33.0 to 2.37.2.

Override RUNNER_ENVIRONMENT instead. setup-php then resolves the runner to github by itself, so the conflict check no longer triggers and PHP is still installed from the prebuilt package rather than compiled from the ondrej PPA. The env is scoped to this step, so other actions keep seeing the real value.

GITHUB_EMULATION was never read by setup-php and is dropped.

setup-php 2.37 rejects a forced RUNNER=github when it detects a
self-hosted environment and exits 1 with "Runner set as github in
self-hosted environment". Since our runs-on runners report
RUNNER_ENVIRONMENT=self-hosted, every job using this action broke when
the pin moved from 2.33.0 to 2.37.2.

Override RUNNER_ENVIRONMENT instead. setup-php then resolves the runner
to github by itself, so the conflict check no longer triggers and PHP is
still installed from the prebuilt package rather than compiled from the
ondrej PPA. The env is scoped to this step, so other actions keep seeing
the real value.

GITHUB_EMULATION was never read by setup-php and is dropped.
@fruppel

Copy link
Copy Markdown
Author

closed in favor of #47

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.

1 participant