diff --git a/README.md b/README.md index 9cbc3c7..1584d98 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,10 @@ If set, this branch will be used to push the packages instead of `DEB_DISTRO-ROS If set to true, Git Large File Storage will be used to store the generated binaries. +## ``PRE_BUILD_HOOK`` + +TODO + ## Example usage ``` diff --git a/action.yaml b/action.yaml index e0ccf6c..99cd84f 100644 --- a/action.yaml +++ b/action.yaml @@ -40,6 +40,9 @@ inputs: GIT_LFS: description: If set to true, use Git Large File Storage for storing binaries (*.deb and *.ddeb) required: false + PRE_BUILD_HOOK: + description: If set, this script will be executed before running sbuild. + required: false runs: using: composite steps: @@ -66,6 +69,7 @@ runs: ROSDEP_SOURCE: ${{ inputs.ROSDEP_SOURCE }} SKIP_ROS_REPOSITORY: ${{ inputs.SKIP_ROS_REPOSITORY }} SKIP_PACKAGES: ${{ inputs.SKIP_PACKAGES }} + PRE_BUILD_HOOK: ${{ inputs.PRE_BUILD_HOOK }} - name: Create apt repository and deploy it run: $GITHUB_ACTION_PATH/repository shell: sh diff --git a/build b/build index 1148483..8bf6ef9 100755 --- a/build +++ b/build @@ -81,6 +81,12 @@ echo "$ROSDEP_SOURCE" > "$APT_REPO/2-remote.list" ROS_HOME="$APT_REPO/ros" ROSDEP_SOURCE_PATH="$APT_REPO:/etc/ros/rosdep/sources.list.d/" rosdep update + +if [ -n "$PRE_BUILD_HOOK" ]; then + echo "Run pre-build hook" + eval "$PRE_BUILD_HOOK" +fi + echo "Run sbuild" # Don't build tests