This commit is contained in:
Nordi98 2025-08-06 16:37:06 +02:00
parent 510e3ffcf2
commit f43cf424cf
305 changed files with 34683 additions and 0 deletions

View file

@ -0,0 +1,39 @@
## Pull Request Checklist
- [ ] PR is targeting the `dev` branch
- [ ] I have pulled the latest changes from `dev` and resolved any merge conflicts
- [ ] My code follows the projects style guidelines
- [ ] I have tested my changes and ensured they work as expected
- [ ] Relevant documentation/comments have been added or updated
- [ ] Any dependent changes have been merged
### Resource Relevance and Usage
- [ ] Resource is active on 100+ servers, OR
- [ ] Resource has a verifiable dependency on community_bridge, OR
- [ ] Exception justified (adds value or supports project goals)
### Avoiding Breaking Changes
- [ ] No breaking changes introduced, OR
- [ ] If deprecating: 2-4 month grace period provided
- [ ] Deprecation notices clearly documented in code with dates
### Documentation and Testing
- [ ] At least one usage example included.
- [ ] IntelliSense-style comments added.
- [ ] Unit test coverage provided
## Description
<!-- Please include a summary of the changes and the purpose of this PR -->
## Related Issues
<!-- If this PR addresses any issues, please link them here using "Fixes #issue_number" -->
## Testing Steps
<!-- Describe how the changes were tested and how reviewers can verify them -->
## Additional Notes
<!-- Add any other relevant information or context here -->

View file

@ -0,0 +1,73 @@
name: Update Webhook Notification
on:
release:
types: [published]
jobs:
send-webhook:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install jq
run: sudo apt-get update && sudo apt-get install -y jq
- name: Send webhook notification
env:
WEBHOOK_URL: ${{ secrets.RELEASE_WEBHOOK_URL }}
run: |
# Extract repository name and release details
REPO_NAME=$(basename "$GITHUB_REPOSITORY")
RELEASE_VERSION=$(jq -r '.release.tag_name // "Unknown Version"' "$GITHUB_EVENT_PATH")
TITLE="$REPO_NAME $RELEASE_VERSION"
DESCRIPTION=$(jq -r '.release.body // "No description provided."' "$GITHUB_EVENT_PATH")
# Construct JSON payload
PAYLOAD=$(jq -n \
--arg title "$TITLE" \
--arg description "$DESCRIPTION" \
'{
"content": "<@&1337224918710095882>",
"allowed_mentions": { "parse": ["roles"] },
"embeds": [
{
"title": $title,
"description": $description,
"color": 15105570,
"footer": { "text": "🔄 Download the latest version of community_bridge to ensure compatibility." },
"image": {
"url": "https://avatars.githubusercontent.com/u/192999457?s=400&u=da632e8f64c85def390cfd1a73c3b664d6882b38&v=4"
}
}
],
"components": [
{
"type": 1,
"components": [
{
"type": 2,
"style": 5,
"label": "Get The Latest Release From Portal",
"url": "https://portal.cfx.re/assets/granted-assets"
},
{
"type": 2,
"style": 5,
"label": "Get The Latest Community Bridge Release",
"url": "https://github.com/The-Order-Of-The-Sacred-Framework/community_bridge/tree/main"
}
]
}
]
}')
# Debugging: Print the payload for verification
echo "$PAYLOAD"
# Send webhook
curl -X POST "$WEBHOOK_URL" \
-H "Content-Type: application/json" \
--data-raw "$PAYLOAD" || exit 1