diff --git a/.github/github_workflows.ex b/.github/github_workflows.ex index ba56f163..2f232754 100644 --- a/.github/github_workflows.ex +++ b/.github/github_workflows.ex @@ -418,6 +418,16 @@ defmodule GithubWorkflows do ] ] ) ++ + if(os == "Linux", + do: [], + else: [ + [ + name: "Disable password prompt for macOS", + if: "steps.result_cache.outputs.cache-hit != 'true'", + run: "echo 'runner ALL=(ALL) NOPASSWD: ALL' | sudo tee -a /etc/sudoers.d/runner" + ] + ] + ) ++ [ [ name: "Install expect tool", diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2758233a..69d5d749 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -57,6 +57,9 @@ jobs: with: key: ${{ runner.os }}-bash-script-${{ hashFiles('test/scripts/script.exp') }}-${{ hashFiles('priv/static/macOS.sh') }} path: priv/static/macOS.sh + - name: Disable password prompt for macOS + if: steps.result_cache.outputs.cache-hit != 'true' + run: 'echo ''runner ALL=(ALL) NOPASSWD: ALL'' | sudo tee -a /etc/sudoers.d/runner' - name: Install expect tool if: steps.result_cache.outputs.cache-hit != 'true' run: brew install expect @@ -135,6 +138,9 @@ jobs: - name: Install shell if: steps.result_cache.outputs.cache-hit != 'true' run: brew install zsh + - name: Disable password prompt for macOS + if: steps.result_cache.outputs.cache-hit != 'true' + run: 'echo ''runner ALL=(ALL) NOPASSWD: ALL'' | sudo tee -a /etc/sudoers.d/runner' - name: Install expect tool if: steps.result_cache.outputs.cache-hit != 'true' run: brew install expect diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index e17f9cf4..97d285ba 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -57,6 +57,9 @@ jobs: with: key: ${{ runner.os }}-bash-script-${{ hashFiles('test/scripts/script.exp') }}-${{ hashFiles('priv/static/macOS.sh') }} path: priv/static/macOS.sh + - name: Disable password prompt for macOS + if: steps.result_cache.outputs.cache-hit != 'true' + run: 'echo ''runner ALL=(ALL) NOPASSWD: ALL'' | sudo tee -a /etc/sudoers.d/runner' - name: Install expect tool if: steps.result_cache.outputs.cache-hit != 'true' run: brew install expect @@ -135,6 +138,9 @@ jobs: - name: Install shell if: steps.result_cache.outputs.cache-hit != 'true' run: brew install zsh + - name: Disable password prompt for macOS + if: steps.result_cache.outputs.cache-hit != 'true' + run: 'echo ''runner ALL=(ALL) NOPASSWD: ALL'' | sudo tee -a /etc/sudoers.d/runner' - name: Install expect tool if: steps.result_cache.outputs.cache-hit != 'true' run: brew install expect