pub fn workflows_differ(root: &Path) -> Result<Option<String>>Expand description
Whether .github/workflows/ at the commit the run executes differs from
the default branch’s tip.
It is None when the two trees are the same object, and otherwise names
both commits.
Actions runs the workflows of GITHUB_SHA.
In a reusable workflow’s publish job HEAD is the version commit instead.
So the tree compared is the one at GITHUB_SHA when that variable names a
commit in the repository, and HEAD’s otherwise.
A retry of an old release commit runs its workflows as they were at that commit. Steps or permissions changed since can publish to the registry and then fail to tag, and the registry cannot take a version back.
Equal tree ids prove equal content, so no file is read. A tree that is missing on both sides counts as equal.
§Errors
Returns an error when no repository covers root, HEAD has no commit, or
the default branch ref is missing or cannot be resolved.