Skip to content

Commit

Permalink
fix empty message
Browse files Browse the repository at this point in the history
  • Loading branch information
npolshakova authored and Vyom-Yadav committed Jan 5, 2025
1 parent 5bc1768 commit cfd069d
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/krel-release-notes-validate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,8 @@ jobs:
# If there are any invalid files, set the output variable and fail the job
if [ -n "$INVALID_FILES" ]; then
echo "invalid_files<<EOF" >> $GITHUB_ENV
echo -e "$INVALID_FILES" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
echo "invalid_files=$INVALID_FILES" >> $GITHUB_ENV
echo "::set-output name=invalid_files::$(echo -n "$INVALID_FILES")"
exit 1
else
echo "All YAML files are valid."
Expand All @@ -120,12 +119,10 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }} # Ensure this is provided for authentication
script: |
const invalidFiles = process.env.invalid_files.trim();
const invalidFiles = '${{ steps.validate_releases_yaml.outputs.invalid_files }}'.trim();
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: `The following YAML files are invalid:\n\n${invalidFiles}`
})
env:
invalid_files: ${{ env.invalid_files }}

0 comments on commit cfd069d

Please sign in to comment.