ci: only comment AUTORELEASE deprecation if exists
If it doesn't exists, don't confuse the contributors. Signed-off-by: Paul Spooren <mail@aparcar.org>
This commit is contained in:
parent
318e48c6f9
commit
75ff4ba358
|
@ -28,6 +28,8 @@ jobs:
|
||||||
|
|
||||||
- name: Determine changed packages
|
- name: Determine changed packages
|
||||||
run: |
|
run: |
|
||||||
|
RET=0
|
||||||
|
|
||||||
# only detect packages with changes
|
# only detect packages with changes
|
||||||
PKG_ROOTS=$(find . -name Makefile | \
|
PKG_ROOTS=$(find . -name Makefile | \
|
||||||
grep -v ".*/src/Makefile" | \
|
grep -v ".*/src/Makefile" | \
|
||||||
|
@ -46,14 +48,13 @@ jobs:
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ -n "$CONTAINS_AUTORELEASE" ]; then
|
if [ -n "$CONTAINS_AUTORELEASE" ]; then
|
||||||
|
RET=1
|
||||||
cat > "$GITHUB_WORKSPACE/pr_comment.md" << EOF
|
cat > "$GITHUB_WORKSPACE/pr_comment.md" << EOF
|
||||||
Please do no longer set *PKG_RELEASE* to *AUTORELEASE* as the
|
Please do no longer set *PKG_RELEASE* to *AUTORELEASE* as the
|
||||||
feature is deprecated. Please use an integer instead. Below is a
|
feature is deprecated. Please use an integer instead. Below is a
|
||||||
list of affected packages including correct *PKG_RELEASE*:
|
list of affected packages including correct *PKG_RELEASE*:
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
else
|
|
||||||
echo "No usage of *AUTORELEASE* found in changes" > "$GITHUB_WORKSPACE/pr_comment.md"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for ROOT in $CONTAINS_AUTORELEASE; do
|
for ROOT in $CONTAINS_AUTORELEASE; do
|
||||||
|
@ -70,8 +71,11 @@ jobs:
|
||||||
echo >> "$GITHUB_WORKSPACE/pr_comment.md"
|
echo >> "$GITHUB_WORKSPACE/pr_comment.md"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
exit $RET
|
||||||
|
|
||||||
- name: Find Comment
|
- name: Find Comment
|
||||||
uses: peter-evans/find-comment@v2
|
uses: peter-evans/find-comment@v2
|
||||||
|
if: ${{ failure() }}
|
||||||
id: fc
|
id: fc
|
||||||
with:
|
with:
|
||||||
issue-number: ${{ github.event.pull_request.number }}
|
issue-number: ${{ github.event.pull_request.number }}
|
||||||
|
@ -79,6 +83,7 @@ jobs:
|
||||||
|
|
||||||
- name: Create or update comment
|
- name: Create or update comment
|
||||||
uses: peter-evans/create-or-update-comment@v2
|
uses: peter-evans/create-or-update-comment@v2
|
||||||
|
if: ${{ failure() }}
|
||||||
with:
|
with:
|
||||||
comment-id: ${{ steps.fc.outputs.comment-id }}
|
comment-id: ${{ steps.fc.outputs.comment-id }}
|
||||||
issue-number: ${{ github.event.pull_request.number }}
|
issue-number: ${{ github.event.pull_request.number }}
|
||||||
|
|
Loading…
Reference in New Issue