mirror of
https://github.com/obi1kenobi/cargo-semver-checks-action.git
synced 2024-11-26 01:49:32 +01:00
Use explicit path to action scripts.
This commit is contained in:
parent
402cb63f95
commit
d3807169fd
1 changed files with 4 additions and 5 deletions
|
@ -20,18 +20,17 @@ runs:
|
||||||
- name: Build rustdoc and check it
|
- name: Build rustdoc and check it
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
set -euxo pipefail
|
||||||
|
|
||||||
# Colorize output, since GitHub Actions terminals support color.
|
# Colorize output, since GitHub Actions terminals support color.
|
||||||
export CARGO_TERM_COLOR=always
|
export CARGO_TERM_COLOR=always
|
||||||
|
|
||||||
# Record the current git sha, so we can come back to it after generating the baseline.
|
# Record the current git sha, so we can come back to it after generating the baseline.
|
||||||
export CURRENT_GIT_SHA="$(git rev-parse HEAD)"
|
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 }}"
|
export PACKAGE_NAME="${{ inputs.crate-name }}"
|
||||||
if [[ "$PACKAGE_NAME" == '' ]]; then
|
if [[ "$PACKAGE_NAME" == '' ]]; then
|
||||||
export PACKAGE_NAME="$(find_workspace_crates.sh)"
|
export PACKAGE_NAME="$("$GITHUB_ACTION_PATH/find_workspace_crates.sh")"
|
||||||
fi
|
fi
|
||||||
export PACKAGE_NAME_WITH_UNDERSCORES="$(echo $"PACKAGE_NAME" | tr '-' '_')"
|
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
|
# We *do not* want to record and reuse the target directory path
|
||||||
# across different git commits, since it may be at a different location
|
# across different git commits, since it may be at a different location
|
||||||
# in different commits.
|
# 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
|
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
|
mv "$(cargo metadata --format-version 1 | jq -r .target_directory)/doc/$PACKAGE_NAME_WITH_UNDERSCORES.json" /tmp/baseline.json
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue