From bc1f2c5850d8794f85670a93188f46f759a977b6 Mon Sep 17 00:00:00 2001 From: Adrian Dombeck Date: Mon, 15 Sep 2025 20:01:07 +0200 Subject: [PATCH] gh-actions/build-debian: Add extra-apt-repositories input When building authd, we need to add a PPA before the build dependencies are installed. --- gh-actions/common/build-debian/action.yaml | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/gh-actions/common/build-debian/action.yaml b/gh-actions/common/build-debian/action.yaml index 5d13c5f..746293f 100644 --- a/gh-actions/common/build-debian/action.yaml +++ b/gh-actions/common/build-debian/action.yaml @@ -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. @@ -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 . @@ -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::"