Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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