-
Notifications
You must be signed in to change notification settings - Fork 0
Description
The default behavior of @actions/checkout is to perform a shallow checkout (without commit history, depth = 0).
Additionally, its current behavior is to checkout the commit hash that originally triggered the GH workflow to run (actions/checkout#439).
This becomes undesired behavior in the case that the version stage runs successfully and pushes a version bump commit, but the publish stage fails. After fixing the node-versioner library you'd want to rerun the workflow and have it pull down the latest commit of the branch it ran on. Instead, it will pull down an old commit hash, the version stage will try to push a new version bump commit, and fail because it conflicts with an existing commit.
To work around this, zowe-deploy-test currently runs this command after @actions/checkout:
- run: git pull --no-rebase --no-tags
https://github.com/t1m0thyj/zowe-deploy-test/blob/b7d4b770d71ae35ee21862a83ad4c69ba1bea641/.github/workflows/zowe-cli.yml#L60
Perhaps there is a better solution? If not, we'll need to document this behavior.