From 7946ceb19e3e54550fbb7606f00b8bf5e9031c18 Mon Sep 17 00:00:00 2001 From: Predrag Gruevski Date: Tue, 2 Aug 2022 11:41:19 -0700 Subject: [PATCH] Explicitly fetch the comparison tag. --- action.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 0a4c23b..db6752f 100644 --- a/action.yml +++ b/action.yml @@ -40,7 +40,9 @@ 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 }}$("$GITHUB_ACTION_PATH/find_comparison_version.sh" "$PACKAGE_NAME")" + export COMPARISON_TAG="${{ inputs.version-tag-prefix }}$("$GITHUB_ACTION_PATH/find_comparison_version.sh" "$PACKAGE_NAME")" + git fetch "$COMPARISON_TAG" + git checkout "$COMPARISON_TAG" 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