Skip to content

Commit

Permalink
ci: only comment AUTORELEASE deprecation if exists
Browse files Browse the repository at this point in the history
If it doesn't exists, don't confuse the contributors.

Signed-off-by: Paul Spooren <[email protected]>
  • Loading branch information
aparcar committed Dec 2, 2022
1 parent 318e48c commit 75ff4ba
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/check-autorelease-deprecation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:
- name: Determine changed packages
run: |
RET=0
# only detect packages with changes
PKG_ROOTS=$(find . -name Makefile | \
grep -v ".*/src/Makefile" | \
Expand All @@ -46,14 +48,13 @@ jobs:
done
if [ -n "$CONTAINS_AUTORELEASE" ]; then
RET=1
cat > "$GITHUB_WORKSPACE/pr_comment.md" << EOF
Please do no longer set *PKG_RELEASE* to *AUTORELEASE* as the
feature is deprecated. Please use an integer instead. Below is a
list of affected packages including correct *PKG_RELEASE*:
EOF
else
echo "No usage of *AUTORELEASE* found in changes" > "$GITHUB_WORKSPACE/pr_comment.md"
fi
for ROOT in $CONTAINS_AUTORELEASE; do
Expand All @@ -70,15 +71,19 @@ jobs:
echo >> "$GITHUB_WORKSPACE/pr_comment.md"
done
exit $RET
- name: Find Comment
uses: peter-evans/find-comment@v2
if: ${{ failure() }}
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'

- name: Create or update comment
uses: peter-evans/create-or-update-comment@v2
if: ${{ failure() }}
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
Expand Down

0 comments on commit 75ff4ba

Please sign in to comment.