fix(ci): add fallback for GitHub API failures in release workflow (#388)
## Description CI was failing on new module releases because there was no fallback to gh api failures when there was no previous tag for the module was found. https://github.com/coder/registry/actions/runs/17225186737/job/48868318539 <!-- Briefly describe what this PR does and why --> ## Type of Change - [ ] New module - [ ] Bug fix - [ ] Feature/enhancement - [ ] Documentation - [X] Other
This commit is contained in:
parent
97b036e7d4
commit
6bebc02122
13
.github/workflows/release.yml
vendored
13
.github/workflows/release.yml
vendored
@ -73,10 +73,15 @@ jobs:
|
||||
exit 0
|
||||
fi
|
||||
|
||||
FULL_CHANGELOG=$(gh api repos/:owner/:repo/releases/generate-notes \
|
||||
--field tag_name="$CURRENT_TAG" \
|
||||
--field previous_tag_name="$PREV_TAG" \
|
||||
--jq '.body')
|
||||
if [[ "$PREV_TAG" == release/* ]]; then
|
||||
FULL_CHANGELOG=$(gh api repos/:owner/:repo/releases/generate-notes \
|
||||
--field tag_name="$CURRENT_TAG" \
|
||||
--field previous_tag_name="$PREV_TAG" \
|
||||
--jq '.body')
|
||||
else
|
||||
echo "New module detected, skipping GitHub API"
|
||||
FULL_CHANGELOG=""
|
||||
fi
|
||||
|
||||
MODULE_COMMIT_SHAS=$(git log --format="%H" --no-merges "$PREV_TAG..$CURRENT_TAG" -- "$MODULE_PATH")
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user