Skip to content

Commit

Permalink
ci: fix release workflow to not fail if no Lambda annotations changes
Browse files Browse the repository at this point in the history
  • Loading branch information
philasmar committed Nov 1, 2024
1 parent d51554c commit adbf8b4
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/create-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,12 @@ jobs:
run: |
dotnet build Libraries/Libraries.sln -c Release
git add "*.template"
git commit -m "Update test app CloudFormation templates"
if git diff --cached --quiet; then
echo "No .template files were staged; skipping commit."
else
git commit -m "Update test app CloudFormation templates"
fi
# Update the changelog based on the change files
- name: Update Changelog
run: autover changelog
Expand All @@ -99,9 +104,9 @@ jobs:
echo "CHANGELOG<<EOF"$'\n'"$changelog"$'\n'EOF >> "$GITHUB_OUTPUT"
# Create the Release PR and label it
- name: Create Pull Request
env:
GITHUB_TOKEN: ${{ env.AWS_SECRET_TOKEN }}
run: |
pr_url="$(gh pr create --title "${{ steps.read-release-name.outputs.VERSION }}" --body "${{ steps.read-changelog.outputs.CHANGELOG }}" --base dev --head ${{ steps.create-release-branch.outputs.BRANCH }})"
gh label create "Release PR" --description "A Release PR that includes versioning and changelog changes" -c "#FF0000" -f
gh pr edit $pr_url --add-label "Release PR"
env:
GITHUB_TOKEN: ${{ env.AWS_SECRET_TOKEN }}
run: |
pr_url="$(gh pr create --title "${{ steps.read-release-name.outputs.VERSION }}" --body "${{ steps.read-changelog.outputs.CHANGELOG }}" --base dev --head ${{ steps.create-release-branch.outputs.BRANCH }})"
gh label create "Release PR" --description "A Release PR that includes versioning and changelog changes" -c "#FF0000" -f
gh pr edit $pr_url --add-label "Release PR"

0 comments on commit adbf8b4

Please sign in to comment.