mirror of
https://github.com/tailscale/github-action.git
synced 2026-08-21 08:39:23 +00:00
stop using brew services to start service
Signed-off-by: Lee Briggs <lee@leebriggs.co.uk>
This commit is contained in:
parent
e6c0109a1d
commit
78ee815094
4 changed files with 16 additions and 29 deletions
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
|
|
@ -167,7 +167,7 @@ jobs:
|
|||
run: |
|
||||
if [ "${{ matrix.install-type }}" = "brew" ]; then
|
||||
brew list --formula tailscale
|
||||
brew services list | grep -E '^tailscale[[:space:]]+started'
|
||||
sudo -E tailscale status
|
||||
elif [ "${{ matrix.install-type }}" = "source" ]; then
|
||||
if brew --version >/dev/null 2>&1; then
|
||||
echo "brew should have been unavailable for source install test"
|
||||
|
|
|
|||
13
dist/index.js
generated
vendored
13
dist/index.js
generated
vendored
|
|
@ -41707,17 +41707,8 @@ async function installTailscaleFromSourceOnMacOS(config, toolPath) {
|
|||
core.info("✅ Tailscale installed successfully on macOS from source");
|
||||
}
|
||||
async function startTailscaleDaemon(config, installedWith) {
|
||||
const runnerOS = process.env.RUNNER_OS || "";
|
||||
if (runnerOS === runnerMacOS && installedWith === "brew") {
|
||||
core.info("Starting tailscaled daemon with Homebrew services...");
|
||||
await execSilent("start tailscale homebrew service", "brew", [
|
||||
"services",
|
||||
"start",
|
||||
cmdTailscale,
|
||||
]);
|
||||
await waitForDaemonReady();
|
||||
core.info("✅ tailscaled daemon is up and running!");
|
||||
return;
|
||||
if (installedWith === "brew") {
|
||||
core.info("Starting Homebrew-installed tailscaled daemon manually...");
|
||||
}
|
||||
// Manual daemon start
|
||||
const stateArgs = config.stateDir
|
||||
|
|
|
|||
14
src/main.ts
14
src/main.ts
|
|
@ -792,18 +792,8 @@ async function startTailscaleDaemon(
|
|||
config: TailscaleConfig,
|
||||
installedWith: installMethod
|
||||
): Promise<void> {
|
||||
const runnerOS = process.env.RUNNER_OS || "";
|
||||
|
||||
if (runnerOS === runnerMacOS && installedWith === "brew") {
|
||||
core.info("Starting tailscaled daemon with Homebrew services...");
|
||||
await execSilent("start tailscale homebrew service", "brew", [
|
||||
"services",
|
||||
"start",
|
||||
cmdTailscale,
|
||||
]);
|
||||
await waitForDaemonReady();
|
||||
core.info("✅ tailscaled daemon is up and running!");
|
||||
return;
|
||||
if (installedWith === "brew") {
|
||||
core.info("Starting Homebrew-installed tailscaled daemon manually...");
|
||||
}
|
||||
|
||||
// Manual daemon start
|
||||
|
|
|
|||
|
|
@ -43,10 +43,13 @@ test("Homebrew-owned installs are not saved to the action cache", () => {
|
|||
);
|
||||
});
|
||||
|
||||
test("Homebrew installs start tailscaled through brew services", () => {
|
||||
assert.match(source, /runnerOS === runnerMacOS && installedWith === "brew"/);
|
||||
assert.match(source, /"brew",\s*\[\s*"services",\s*"start",\s*cmdTailscale/);
|
||||
assert.doesNotMatch(source, /"sudo",\s*\[\s*"brew",\s*"services"/);
|
||||
test("Homebrew installs start tailscaled with the manual daemon path", () => {
|
||||
assert.match(
|
||||
source,
|
||||
/Starting Homebrew-installed tailscaled daemon manually/
|
||||
);
|
||||
assert.match(source, /spawn\("sudo", \["-E", cmdTailscaled, \.\.\.args\]/);
|
||||
assert.doesNotMatch(source, /"brew",\s*\[\s*"services",\s*"start"/);
|
||||
});
|
||||
|
||||
test("bundled action includes the macOS Homebrew smoke path", () => {
|
||||
|
|
@ -58,5 +61,8 @@ test("bundled action includes the macOS Homebrew smoke path", () => {
|
|||
bundled,
|
||||
/Installing Tailscale \$\{config\.resolvedVersion\} via Homebrew/
|
||||
);
|
||||
assert.match(bundled, /start tailscale homebrew service/);
|
||||
assert.match(
|
||||
bundled,
|
||||
/Starting Homebrew-installed tailscaled daemon manually/
|
||||
);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue