comment-changes: CI fails with code 64 and message "Tag v1.2.3 does not seem to exist." #1029
-
In my CI, I use the following workflow: name: comment-changes
on:
workflow_dispatch:
permissions:
contents: write
jobs:
changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
ref: ${{ github.head_ref }}
- uses: fregante/[email protected]
- run: |
rustup update
cargo install aeruginous --all-features
aeruginous comment-changes -d ::= -f ron -k -o changelog.d/ -T "v$(cat .version)"
git add changelog.d/
git commit -m 'Create summary of recent changes'
git push This workflow shall create a single fragment with all changes since the last release, tag
What do I do wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The problem can be resolved by checking out the repository with the following setup: - uses: actions/[email protected]
with:
fetch-depth: 0
ref: ${{ github.head_ref }} The key point is the line |
Beta Was this translation helpful? Give feedback.
The problem can be resolved by checking out the repository with the following setup:
The key point is the line
fetch-depth: 0
which adjusts the number of commits being checked out. By default,actions/checkout
will only checkout 1 commit (the one referred to by HEAD) in order to improve the performance, especially in repositories with many commits. Unfortunately, the last commit is not necessarily one with the queried tag, in your casev1.2.3
. Thus, Aeruginous cannot find the tag because it has no access to the respective commit.