Skip to content
Merged
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
16 changes: 12 additions & 4 deletions .github/workflows/.build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
release:
required: false
type: string
distro:
distros:
required: false
type: string

Expand All @@ -38,12 +38,19 @@ jobs:
env:
INPUT_NAME: ${{ inputs.name }}
INPUT_RELEASE: ${{ inputs.release }}
INPUT_DISTRO: ${{ inputs.distro }}
INPUT_DISTROS: ${{ inputs.distros }}
with:
script: |
const inpName = core.getInput('name');
const inpRelease = core.getInput('release');
const inpDistro = core.getInput('distro');
const inpDistros = core.getInput('distros');
let distroFilter = [];
if (inpDistros) {
distroFilter = inpDistros
.split(',')
.map(d => d.trim())
.filter(d => d !== '');
}

if (inpRelease !== '' && !['pushonly', 'draft', 'prerelease', 'release'].includes(inpRelease)) {
throw new Error(`Invalid release type: ${inpRelease}`);
Expand Down Expand Up @@ -73,7 +80,8 @@ jobs:
const pkgName = match[1];
const distro = match[2];
// Skip distros that don't match the input distro filter
if (inpDistro !== '' && distro !== inpDistro) {
if (distroFilter.length > 0 && !distroFilter.includes(distro)) {
core.info(`Skipping ${targetName} because it doesn't match the input distro filter`);
continue;
}
const target = def.target[targetName];
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-buildx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ on:
- draft
- prerelease
- release
distro:
description: 'Single distro to build'
distros:
description: 'Distros to build (comma-separated, e.g. "debian12,ubuntu2204")'
required: false
type: string
default: ''
Expand All @@ -44,7 +44,7 @@ jobs:
with:
name: buildx
release: ${{ inputs.release }}
distro: ${{ inputs.distro }}
distros: ${{ inputs.distros }}
envs: |
PKG_REPO=${{ inputs.repo }}
PKG_REF=${{ inputs.ref }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ on:
- draft
- prerelease
- release
distro:
description: 'Single distro to build for'
distros:
description: 'Distros to build (comma-separated, e.g. "debian12,ubuntu22.04")'
required: false
type: string
default: ''
Expand All @@ -44,7 +44,7 @@ jobs:
with:
name: compose
release: ${{ inputs.release }}
distro: ${{ inputs.distro }}
distros: ${{ inputs.distros }}
envs: |
PKG_REPO=${{ inputs.repo }}
PKG_REF=${{ inputs.ref }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-containerd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ on:
- draft
- prerelease
- release
distro:
description: 'Single distro to build for'
distros:
description: 'Distros to build (comma-separated, e.g. "debian12,ubuntu22.04")'
required: false
type: string
default: ''
Expand All @@ -44,7 +44,7 @@ jobs:
with:
name: containerd
release: ${{ inputs.release }}
distro: ${{ inputs.distro }}
distros: ${{ inputs.distros }}
envs: |
PKG_REPO=${{ inputs.repo }}
PKG_REF=${{ inputs.ref }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-credential-helpers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ on:
- draft
- prerelease
- release
distro:
description: 'Single distro to build'
distros:
description: 'Distros to build (comma-separated, e.g. "debian12,ubuntu22.04")'
required: false
type: string
default: ''
Expand All @@ -44,7 +44,7 @@ jobs:
with:
name: credential-helpers
release: ${{ inputs.release }}
distro: ${{ inputs.distro }}
distros: ${{ inputs.distros }}
envs: |
PKG_REPO=${{ inputs.repo }}
PKG_REF=${{ inputs.ref }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-docker-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ on:
- draft
- prerelease
- release
distro:
description: 'Single distro to build'
distros:
description: 'Distros to build (comma-separated, e.g. "debian12,ubuntu22.04")'
required: false
type: string
default: ''
Expand All @@ -44,7 +44,7 @@ jobs:
with:
name: docker-cli
release: ${{ inputs.release }}
distro: ${{ inputs.distro }}
distros: ${{ inputs.distros }}
envs: |
PKG_REPO=${{ inputs.repo }}
PKG_REF=${{ inputs.ref }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-docker-engine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ on:
- draft
- prerelease
- release
distro:
description: 'Single distro to build'
distros:
description: 'Distros to build (comma-separated, e.g. "debian12,ubuntu22.04")'
required: false
type: string
default: ''
Expand All @@ -44,7 +44,7 @@ jobs:
with:
name: docker-engine
release: ${{ inputs.release }}
distro: ${{ inputs.distro }}
distros: ${{ inputs.distros }}
envs: |
PKG_REPO=${{ inputs.repo }}
PKG_REF=${{ inputs.ref }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-model.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ on:
- draft
- prerelease
- release
distro:
description: 'Single distro to build'
distros:
description: 'Distros to build (comma-separated, e.g. "debian12,ubuntu22.04")'
required: false
type: string
default: ''
Expand All @@ -44,7 +44,7 @@ jobs:
with:
name: model
release: ${{ inputs.release }}
distro: ${{ inputs.distro }}
distros: ${{ inputs.distros }}
envs: |
PKG_REPO=${{ inputs.repo }}
PKG_REF=${{ inputs.ref }}
Expand Down