Skip to content

Commit

Permalink
Use env.RUNNER_ENVIRONMENT to check runner type
Browse files Browse the repository at this point in the history
Signed-off-by: Jordan Jacobelli <[email protected]>
  • Loading branch information
jjacobelli committed Oct 25, 2023
1 parent 1ab9117 commit 8f5c1a6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/actions/devcontainer-json/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ runs:
using: composite
steps:

- name: Setup Node.js
if: contains(runner.name, 'linux-') == true
- if: env.RUNNER_ENVIRONMENT != "github-hosted"
name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
Expand Down
8 changes: 4 additions & 4 deletions .github/actions/setup-runner-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@ runs:
using: composite
steps:

- if: contains(runner.name, 'linux-') != true
- if: env.RUNNER_ENVIRONMENT == "github-hosted"
name: Free up disk space
uses: ./.github/actions/free-disk-space
with:
tool_cache: "${{ runner.tool_cache }}"

- if: contains(runner.name, 'linux-') == true
- if: env.RUNNER_ENVIRONMENT != "github-hosted"
name: Setup self-hosted runner environment
shell: bash -eo pipefail {0}
run: |
echo "HOME=${{ runner.workspace }}" >> $GITHUB_ENV;
echo "TMPDIR=${{ runner.temp }}" >> $GITHUB_ENV;
- if: contains(runner.name, 'linux-') == true
- if: env.RUNNER_ENVIRONMENT != "github-hosted"
name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '16'

- if: contains(runner.name, 'linux-') != true
- if: env.RUNNER_ENVIRONMENT == "github-hosted"
name: Set up QEMU
uses: docker/setup-qemu-action@v2

Expand Down

0 comments on commit 8f5c1a6

Please sign in to comment.