Skip to content

Commit 41a4cb2

Browse files
committed
refactor(ci): rename and restructure GitHub Actions runner images
- Renamed the base image build step from "build - base image" to "build - ubuntu - base". - Changed working directory for building the base image from "./src/images/base" to "./src/images/ubuntu/base". - Renamed the build-and-push step from "build-and-push - default" to "build-and-push - ubuntu". - Added new tags for pushing: ":ubuntu" and ":ubuntu-latest". - Moved 'build-base.ps1' script from 'src/images/base' to 'src/images/ubuntu/base'. - Updated docker build command in 'build-base.ps1' script, changed tag name from 'actions-runner-base' to 'github-actions-runner:ubuntu-base'. - Moved Dockerfile from 'src/images/base' to 'src/images/ubuntu/base'. - Moved Dockerfile from 'src/images/default' to 'src/images/ubuntu/default', updated FROM directive in Dockerfile, changed base image name from 'actions-runner-base' to 'github-actions-runner:ubuntu-base'.
1 parent 45b0416 commit 41a4cb2

File tree

5 files changed

+9
-7
lines changed

5 files changed

+9
-7
lines changed

.github/workflows/actions-runner-images.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,22 @@ jobs:
4141
password: ${{ secrets.ES_GITHUB_PAT }}
4242

4343

44-
- name: build - base image
44+
- name: build - ubuntu - base
4545
shell: pwsh
4646
run: ./build-base.ps1
47-
working-directory: ./src/images/base
47+
working-directory: ./src/images/ubuntu/base
4848

4949

50-
- name: build-and-push - default
50+
- name: build-and-push - ubuntu
5151
uses: docker/build-push-action@v3
5252
with:
5353
context: ./src/images/default
5454
platforms: |
5555
linux/amd64
5656
tags: |
5757
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
58+
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:ubuntu
59+
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:ubuntu-latest
5860
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
5961
labels: |
6062
org.opencontainers.image.licenses=MIT

src/images/default/Dockerfile

Lines changed: 0 additions & 3 deletions
This file was deleted.
File renamed without changes.

src/images/base/build-base.ps1 renamed to src/images/ubuntu/base/build-base.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ Write-Output "runner-container-hooks version: $runnerContainerHooksVersion"
88
$buildxVersion= (Invoke-WebRequest -Uri "https://github.com/docker/buildx/releases/latest" -UseBasicParsing).BaseResponse.RequestMessage.RequestUri.Segments[-1].Replace("v","")
99
Write-Output "buildx version: $buildxVersion"
1010

11-
docker build --build-arg RUNNER_VERSION=$runnerVersion --build-arg RUNNER_CONTAINER_HOOKS_VERSION=$runnerContainerHooksVersion --build-arg BUILDX_VERSION=$buildxVersion -t actions-runner-base .
11+
docker build --build-arg RUNNER_VERSION=$runnerVersion --build-arg RUNNER_CONTAINER_HOOKS_VERSION=$runnerContainerHooksVersion --build-arg BUILDX_VERSION=$buildxVersion -t github-actions-runner:ubuntu-base .
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM github-actions-runner:ubuntu-base
2+
3+
USER runner

0 commit comments

Comments
 (0)