Skip to content

Commit

Permalink
github: allow manual triggering of selected distributions [skip ci]
Browse files Browse the repository at this point in the history
(cherry picked from commit e62bd17)
  • Loading branch information
linuxmaniac committed Jul 3, 2024
1 parent 5ba14d2 commit acb7fa1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/github-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:
- '5.*'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
dists:
description: list of dists to build, coma separated. xenial,sid
required: false
type: string
env:
REGISTRY_NAME: ghcr.io
IMAGE_NAME: kamailio
Expand All @@ -18,7 +23,7 @@ jobs:
- id: set-matrix
run: |
sudo apt-get install jq
echo "matrix=$(bash get-all-dist.sh)" >> $GITHUB_OUTPUT
echo "matrix=$(bash get-all-dist.sh ${{ github.event.inputs.dists }})" >> $GITHUB_OUTPUT
outputs:
dist: ${{ steps.set-matrix.outputs.matrix }}
docker:
Expand Down
10 changes: 7 additions & 3 deletions get-all-dist.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/bash
find . -name Dockerfile -exec dirname {} \; | \
grep -v -e 'stretch' -e 'bookworm' | \
jq -R . | sed 's#./##g' | jq -cs .
if [ -n "${1}" ] ; then
echo "\"${1}\"" | jq -c 'split(",")'
else
find . -name Dockerfile -exec dirname {} \; | \
grep -v -e 'stretch' | \
jq -R . | sed 's#./##g' | jq -cs .
fi

0 comments on commit acb7fa1

Please sign in to comment.