Skip to content

Commit

Permalink
Fix buildx setup on github runners (rapidsai#220)
Browse files Browse the repository at this point in the history
* Fix buildx setup on github runners

* change conditional to `env.RUNNER_ENV == 'self-hosted'
  • Loading branch information
trxcllnt committed Feb 5, 2024
1 parent dd0a1e2 commit 6f3276b
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions .github/actions/setup-runner-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,46 @@ description: Setup self-hosted runner environment
runs:
using: composite
steps:
- name: Dump env
shell: bash -eo pipefail {0}
run: echo "${{ toJSON(env) }}"

- if: env.RUNNER_ENVIRONMENT == 'github-hosted'
- if: env.RUNNER_ENVIRONMENT != 'self-hosted'
name: Free up disk space
uses: ./.github/actions/free-disk-space
with:
tool_cache: "${{ runner.tool_cache }}"

- if: env.RUNNER_ENVIRONMENT != 'github-hosted'
- if: env.RUNNER_ENVIRONMENT == 'self-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: env.RUNNER_ENVIRONMENT != 'github-hosted'
- if: env.RUNNER_ENVIRONMENT == 'self-hosted'
name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '16'

- if: env.RUNNER_ENVIRONMENT == 'github-hosted'
- if: env.RUNNER_ENVIRONMENT != 'self-hosted'
name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Create docker context
shell: bash
run: docker context create builder

- name: Setup docker buildx
- if: env.RUNNER_ENVIRONMENT != 'self-hosted'
name: Setup docker buildx on github-hosted runners
uses: docker/setup-buildx-action@v2
with:
buildkitd-flags: --debug
endpoint: builder

- if: env.RUNNER_ENVIRONMENT == 'self-hosted'
name: Setup docker buildx on self-hosted runners
uses: docker/setup-buildx-action@v2
with:
buildkitd-flags: --debug --config /etc/buildkit/buildkitd.toml
Expand Down

0 comments on commit 6f3276b

Please sign in to comment.