Skip to content

Commit fd4eec1

Browse files
committed
configurable params
1 parent 88f9b6b commit fd4eec1

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

.github/workflows/build-ci-runner-image.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ on:
99
- 'docker/ci-runner.Dockerfile'
1010
- '.github/workflows/build-ci-runner-image.yml'
1111
workflow_dispatch:
12+
inputs:
13+
nodejs_version:
14+
description: 'Node.js version to use'
15+
required: true
16+
default: '22'
17+
debian_version:
18+
description: 'Debian codename version to use'
19+
required: true
20+
default: 'trixie'
1221

1322
env:
1423
IMAGE_NAME: ghcr.io/${{ github.repository }}/ci-runner
@@ -37,15 +46,17 @@ jobs:
3746
with:
3847
images: ${{ env.IMAGE_NAME }}
3948
tags: |
40-
type=ref,event=branch
41-
type=sha
42-
type=raw,value=latest,enable={{is_default_branch}}
49+
type=raw,value=node-${{ inputs.NODEJS_VERSION }}-${{ inputs.DEBIAN_VERSION }}-slim
50+
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
4351
4452
- name: Build and push
4553
uses: docker/build-push-action@v6
4654
with:
4755
context: .
4856
file: ${{ env.DOCKERFILE_PATH }}
57+
build-args: |
58+
NODEJS_VERSION=${{ inputs.nodejs_version }}
59+
DEBIAN_VERSION=${{ inputs.debian_version }}
4960
push: true
5061
tags: ${{ steps.meta.outputs.tags }}
5162
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)