Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(actions): add GH self-hosted runner for tests requiring network syncs #6740

Closed
wants to merge 14 commits into from
Closed
Show file tree
Hide file tree
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
24 changes: 23 additions & 1 deletion .github/workflows/build-docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
name: Build docker image

on:
workflow_dispatch:
inputs:
image_name:
description: 'The docker image name to use for the registry'
required: true
type: string
dockerfile_path:
description: 'The path to the Dockerfile in the repository'
required: true
type: string
dockerfile_target:
description: 'The target stage to build in the Dockerfile'
required: true
type: string
docker_context:
description: 'The context to use for the docker build'
required: false
type: string
workflow_call:
inputs:
image_name:
Expand All @@ -12,6 +30,10 @@ on:
dockerfile_target:
required: true
type: string
docker_context:
description: 'The context to use for the docker build'
required: false
type: string
short_sha:
required: false
type: string
Expand Down Expand Up @@ -137,7 +159,7 @@ jobs:
uses: docker/[email protected]
with:
target: ${{ inputs.dockerfile_target }}
context: .
context: ${{ inputs.docker_context || '.' }}
file: ${{ inputs.dockerfile_path }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/build-runner-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Build runner image

# Ensures that only one workflow task will run at a time. Previous builds, if
# already in process, will get cancelled. Only the latest commit will be allowed
# to run, cancelling any workflows in between
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

# TODO: add condition to only run when needed
on:
push:

jobs:
build:
name: Build CI Docker
uses: ./.github/workflows/build-docker-image.yml
with:
dockerfile_path: ./docker/gh-runner/Dockerfile
dockerfile_target: runner
docker_context: ./docker/gh-runner
image_name: gh-runner
Loading
Loading