diff --git a/README.md b/README.md index 0e1ae43..e896dfa 100644 --- a/README.md +++ b/README.md @@ -17,19 +17,24 @@ Convert ROS packages to Debian packages. Repos file with list of repositories to package. Defaults to sources.repos. +## `SBUILD_CONF` + +Additional sbuild.conf lines. +For example EXTRA_REPOSITORIES, or VERBOSE. +See man sbuild.conf. + +## `ROSDEP_SOURCE` + +Additional rosdep sources. + ## `GITHUB_TOKEN` -Set to `${{ secrets.GITHUB_TOKEN }}` to deploy to a `DEB_DISTRO-ROS_DISTRO` -branch in the same repo. +Set to `${{ secrets.GITHUB_TOKEN }}` to deploy to a `DEB_DISTRO-ROS_DISTRO` branch in the same repo. ## ``SQUASH_HISTORY`` If set to true, all previous commits on the target branch will be discarded. -For example, if you are deploying a static site with lots of binary artifacts, this can help the repository becoming overly bloated. - -## `VERBOSE` - -Set to true to enable verbose builds. +For example, if you are deploying a static site with lots of binary artifacts, this can help prevent the repository from becoming overlay bloated ## Example usage diff --git a/action.yaml b/action.yaml index dff5ae0..1a4e98a 100644 --- a/action.yaml +++ b/action.yaml @@ -15,6 +15,13 @@ inputs: description: Repos file with list of repositories to package. required: false default: sources.repos + SBUILD_CONF: + description: Additional sbuild.conf lines. For example EXTRA_REPOSITORIES, + or VERBOSE. See man sbuild.conf. + required: false + ROSDEP_SOURCE: + description: Additional rosdep sources. + required: false GITHUB_TOKEN: description: Set to deploy to a DEB_DISTRO-ROS_DISTRO branch in the same repo. required: false @@ -23,9 +30,6 @@ inputs: description: If set to true, all previous commits on the target branch will be discarded. required: false default: false - VERBOSE: - description: Set to true to enable verbose builds. - default: false runs: using: composite steps: @@ -45,13 +49,14 @@ runs: env: DEB_DISTRO: ${{ inputs.DEB_DISTRO }} REPOS_FILE: ${{ inputs.REPOS_FILE }} + SBUILD_CONF: ${{ inputs.SBUILD_CONF }} - name: Create packages run: $GITHUB_ACTION_PATH/build.sh shell: sh env: ROS_DISTRO: ${{ inputs.ROS_DISTRO }} DEB_DISTRO: ${{ inputs.DEB_DISTRO }} - VERBOSE: ${{ inputs.VERBOSE }} + ROSDEP_SOURCE: ${{ inputs.ROSDEP_SOURCE }} - name: Create apt repository run: $GITHUB_ACTION_PATH/repository.sh shell: sh diff --git a/build.sh b/build.sh index df0d5e7..4870d00 100755 --- a/build.sh +++ b/build.sh @@ -3,8 +3,6 @@ set -ex -test -n "$VERBOSE" && set -- --verbose - if debian-distro-info --all | grep -q "$DEB_DISTRO"; then DISTRIBUTION=debian elif ubuntu-distro-info --all | grep -q "$DEB_DISTRO"; then @@ -45,6 +43,7 @@ for PKG in $(catkin_topological_order --only-names); do printf "%s:\n %s:\n - %s\n" "$PKG" "$DISTRIBUTION" "ros-$ROS_DEB$(printf '%s' "$PKG" | tr '_' '-')" >> /home/runner/apt_repo/local.yaml done echo "yaml file:///home/runner/apt_repo/local.yaml $ROS_DISTRO" | sudo tee /etc/ros/rosdep/sources.list.d/1-local.list +printf "%s" "$ROSDEP_SOURCE" | sudo tee /etc/ros/rosdep/sources.list.d/2-remote.list rosdep update @@ -74,8 +73,8 @@ for PKG_PATH in $(catkin_topological_order --only-folders); do # dpkg-source-opts: no need for upstream.tar.gz sbuild --chroot-mode=unshare --no-clean-source --no-run-lintian \ - --dpkg-source-opts="-Zgzip -z1 --format=1.0 -sn" \ - --build-dir=/home/runner/apt_repo --extra-package=/home/runner/apt_repo "$@" + --dpkg-source-opts="-Zgzip -z1 --format=1.0 -sn" --build-dir=/home/runner/apt_repo \ + --extra-package=/home/runner/apt_repo "$@" ) COUNT=$((COUNT+1)) echo "::endgroup::" diff --git a/prepare.sh b/prepare.sh index bf3ff21..e4bf8f0 100755 --- a/prepare.sh +++ b/prepare.sh @@ -29,6 +29,9 @@ $build_path = "/build/package/"; $dsc_dir = "package"; $unshare_bind_mounts = [ { directory => '/home/runner/.cache/ccache', mountpoint => '/build/ccache' } ]; EOF +echo "$SBUILD_CONF" >> ~/.sbuildrc + +cat ~/.sbuildrc echo "Checkout workspace"