Skip to content

Commit

Permalink
Merge pull request #38 from pantheon-systems/github-actions-notes
Browse files Browse the repository at this point in the history
  • Loading branch information
joemiller authored May 23, 2020
2 parents 3f09ff3 + 1465f6d commit cee2e1d
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Automatically increment version tags to a git repo based on commit messages.
* [Build metadata](#build-metadata)
* [Examples](#examples)
* [Goreleaser](#goreleaser)
* [Troubleshooting](#troubleshooting)
* [error getting head commit: object does not exist [id: refs/heads/master, rel_path: ]](#error-getting-head-commit-object-does-not-exist-id-refsheadsmaster-rel_path-)
* [Build from Source](#build-from-source)
* [Release information](#release-information)

Expand Down Expand Up @@ -255,6 +257,30 @@ workflows:
- master
```
Troubleshooting
---------------
### error getting head commit: object does not exist [id: refs/heads/master, rel_path: ]
```
error getting head commit: object does not exist [id: refs/heads/master, rel_path: ]
```
You may run into this error on certain CI platforms such as Github Actions or Azure DevOps
Pipelines. These platforms tend to make shallow clones of the git repo leaving out important data
that `autotag` expects to find. This can be solved by adding the following commands prior to
running `autotag`:

```sh
# fetch all tags and history:
git fetch --tags --unshallow --prune
if [ $(git rev-parse --abbrev-ref HEAD) != "master" ]; then
# ensure a local 'master' branch exists at 'refs/heads/master'
git branch --track master origin/master
fi
```

Build from Source
-----------------

Expand Down

0 comments on commit cee2e1d

Please sign in to comment.