diff --git a/action.yml b/action.yml index 5946e26..4250275 100644 --- a/action.yml +++ b/action.yml @@ -20,18 +20,17 @@ runs: - name: Build rustdoc and check it shell: bash run: | + set -euxo pipefail + # Colorize output, since GitHub Actions terminals support color. export CARGO_TERM_COLOR=always # Record the current git sha, so we can come back to it after generating the baseline. export CURRENT_GIT_SHA="$(git rev-parse HEAD)" - # Ensure this action's scripts are available to run on the path. - echo "${{ github.action_path }}" >> $GITHUB_PATH - export PACKAGE_NAME="${{ inputs.crate-name }}" if [[ "$PACKAGE_NAME" == '' ]]; then - export PACKAGE_NAME="$(find_workspace_crates.sh)" + export PACKAGE_NAME="$("$GITHUB_ACTION_PATH/find_workspace_crates.sh")" fi export PACKAGE_NAME_WITH_UNDERSCORES="$(echo $"PACKAGE_NAME" | tr '-' '_')" @@ -41,7 +40,7 @@ runs: # We *do not* want to record and reuse the target directory path # across different git commits, since it may be at a different location # in different commits. - git checkout "${{ inputs.version-tag-prefix }}$(find_comparison_version.sh "$PACKAGE_NAME")" + git checkout "${{ inputs.version-tag-prefix }}$("$GITHUB_ACTION_PATH/find_comparison_version.sh" "$PACKAGE_NAME")" cargo +nightly rustdoc -- -Zunstable-options --output-format json mv "$(cargo metadata --format-version 1 | jq -r .target_directory)/doc/$PACKAGE_NAME_WITH_UNDERSCORES.json" /tmp/baseline.json