Skip to content
Open
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
33 changes: 33 additions & 0 deletions gh-actions/common/build-debian/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ inputs:
# FIXME: this should default to '', but we don't want to break job depending on us for now
default: 'ca-certificates'

extra-apt-repositories:
description: |
A list of extra APT repositories to add.
The entries are passed to add-apt-repository, one per line.

extra-source-build-script:
description: |
A script to run to prepare the source build machine.
Expand Down Expand Up @@ -210,6 +215,20 @@ runs:
"${{ env.GITHUB_ACTION_PATH }}"/prepare-container.sh
echo "::endgroup::"

if [ -n "${{ inputs.extra-apt-repositories != '' && 'true' || '' }}" ]; then
echo "::group::Add extra APT repositories"
(
set -eux
apt-get install -y software-properties-common
echo "${{ inputs.extra-apt-repositories }}" | while read -r repo; do
if [ -n "$repo" ]; then
add-apt-repository -y "$repo"
fi
done
)
echo "::endgroup::"
fi

echo "::group::Install build dependencies"
apt build-dep .

Expand Down Expand Up @@ -374,6 +393,20 @@ runs:
apt install fakeroot
echo "::endgroup::"

if [ -n "${{ inputs.extra-apt-repositories != '' && 'true' || '' }}" ]; then
echo "::group::Add extra APT repositories"
(
set -eux
apt-get install -y software-properties-common
echo "${{ inputs.extra-apt-repositories }}" | while read -r repo; do
if [ -n "$repo" ]; then
add-apt-repository -y "$repo"
fi
done
)
echo "::endgroup::"
fi

echo "::group::Install build dependencies"
apt build-dep .
echo "::endgroup::"
Expand Down
Loading