Skip to content

Commit

Permalink
Merge pull request #139 from consideRatio/pr/update-readme
Browse files Browse the repository at this point in the history
docs: update README about use with GitHub actions
  • Loading branch information
consideRatio authored Aug 3, 2021
2 parents f271608 + 625fc4a commit 05af6d9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,20 +224,23 @@ charts:
### Shallow clones
Chartpress detects the latest commit which changed a directory or file when
Chartpress detects the latest commit that changed a directory or file when
determining the version and tag to use for charts and images. This means that
shallow clones should not be used because if the last commit that changed a
relevant file is outside the shallow commit range, the wrong tag will be
assigned.
relevant file is outside the shallow commit range, the wrong chart version and
image tag will be assigned.
TravisCI uses a clone depth of 50 by default, which can result in incorrect
image tagging. You can [disable this shallow clone
behavior](https://docs.travis-ci.com/user/customizing-the-build/#Git-Clone-Depth)
in your `.travis.yml`:
#### Avoiding shallow clones with GitHub Actions
GitHub Workflow's commonly used GitHub Action called actions/checkout have a
clone clone-depth of 1 by default, configure it to make a full clone instead.
```yaml
git:
depth: false
steps:
- uses: actions/checkout@v2
with:
# chartpress need the git branch's tags and commits
fetch-depth: 0
```
### Command caching
Expand Down
2 changes: 1 addition & 1 deletion chartpress.py
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ def publish_pages(
_check_call(["git", "checkout", "gh-pages"], cwd=checkout_dir, echo=True)

# check if a chart with the same name and version has already been published. If
# there is, the behaviour depends on `-force-publish-chart`
# there is, the behaviour depends on `--force-publish-chart`
# and chart_version and make a decision based on the --force-publish-chart
# flag if that is the case, but always log what's done
if os.path.isfile(os.path.join(checkout_dir, "index.yaml")):
Expand Down

0 comments on commit 05af6d9

Please sign in to comment.