fix: slack annoucement workflow (#46)

This commit is contained in:
Sabiha Khan 2025-11-07 16:06:19 +05:30 committed by GitHub
parent 8d05c9f890
commit dc6d696af6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -11,7 +11,16 @@ jobs:
- name: Check if announcement
id: check
run: |
# GitHub API check to verify it's in announcements category
# Check if the discussion is in the announcements category
CATEGORY="${{ github.event.discussion.category.slug }}"
echo "Category: $CATEGORY"
# Check for both possible variations
if [ "$CATEGORY" = "announcements" ] || [ "$CATEGORY" = "announcement" ]; then
echo "is_announcement=true" >> $GITHUB_OUTPUT
else
echo "is_announcement=false" >> $GITHUB_OUTPUT
fi
- name: Post to Slack
if: steps.check.outputs.is_announcement == 'true'