mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-19 00:43:54 +08:00
* ci: integrate Discourse notifications and refactor notification logic - Replaced Discord webhook notifications with Discourse topic updates. - Introduced reusable `post-to-discourse` composite action. - Added `test-discourse.yaml` workflow for debugging and verification. * ci: adjust notification dependencies and prepare_strategy reference - Updated `notify` step to depend on `prepare_strategy` instead of `build`. - Adjusted variable references to use `prepare_strategy` outputs. * Forcing debug * ci: update environment variable references and add commit information - Switched `PUBLIC_REPO_URL` source to environment variable for consistency. - Added commit SHA variables to enhance template generation logic. * more tweaks! * more tweaks! * bad bot lmao * Test? * i mean.... * i mean.... * getting there * testing the if * testing the if * ci: re-enable notify steps for prebuilt workflow - Uncommented `build` and `publish` dependencies. - Restored conditional logic to trigger only for relevant events. * ci: enhance Discourse action to support new topic creation - Added support for creating new topics with `category-id` and `title`. - Improved input validation and response handling for flexibility. * ci: improve conditions for prebuilt workflow notifications - Refined `if` clause to ensure branches in `DEV_FEEDBACK_NOTIFICATION_BRANCHES` are targeted. - Adjusted logic for accurate topic ID mapping in Discourse integration. * forgot to rename
78 lines
2.8 KiB
YAML
78 lines
2.8 KiB
YAML
name: Debug Discourse Posting
|
|
|
|
on:
|
|
push:
|
|
|
|
jobs:
|
|
test-discourse-post:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Post test message to Discourse
|
|
uses: ./.github/workflows/post-to-discourse
|
|
with:
|
|
discourse-url: ${{ vars.DISCOURSE_URL }}
|
|
api-key: ${{ secrets.DISCOURSE_API_KEY }}
|
|
api-username: ${{ secrets.DISCOURSE_API_USERNAME }}
|
|
topic-id: ${{ vars.DISCOURSE_UPDATES_TOPIC_ID }}
|
|
message: |
|
|
## 🧪 Test Post from GitHub Actions
|
|
|
|
**This is a test post to verify Discourse integration**
|
|
|
|
- **Workflow**: ${{ github.workflow }}
|
|
- **Run Number**: #${{ github.run_number }}
|
|
- **Branch**: `${{ github.ref_name }}`
|
|
- **Commit**: ${{ github.sha }}
|
|
- **Actor**: @${{ github.actor }}
|
|
- **Timestamp**: ${{ github.event.head_commit.timestamp }}
|
|
|
|
---
|
|
|
|
### Fake Build Info (for testing)
|
|
- **Version**: 0.9.8-test
|
|
- **Build**: #42
|
|
- **Branch**: release-test
|
|
|
|
[View workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
|
|
|
|
*This is an automated test message. Drive safe! 🚗💨*
|
|
|
|
|
|
- name: Create topic on Discourse
|
|
uses: ./.github/workflows/post-to-discourse
|
|
with:
|
|
discourse-url: ${{ vars.DISCOURSE_URL }}
|
|
api-key: ${{ secrets.DISCOURSE_API_KEY }}
|
|
api-username: ${{ secrets.DISCOURSE_API_USERNAME }}
|
|
#topic-id: ${{ vars.DISCOURSE_UPDATES_TOPIC_ID }}
|
|
category-id: 4
|
|
title: "This is a test of a new topic instead of a reply"
|
|
message: |
|
|
## 🧪 Test Post from GitHub Actions
|
|
|
|
**This is a test post to verify Discourse integration**
|
|
|
|
- **Workflow**: ${{ github.workflow }}
|
|
- **Run Number**: #${{ github.run_number }}
|
|
- **Branch**: `${{ github.ref_name }}`
|
|
- **Commit**: ${{ github.sha }}
|
|
- **Actor**: @${{ github.actor }}
|
|
- **Timestamp**: ${{ github.event.head_commit.timestamp }}
|
|
|
|
---
|
|
|
|
### Fake Build Info (for testing)
|
|
- **Version**: 0.9.8-test
|
|
- **Build**: #42
|
|
- **Branch**: release-test
|
|
|
|
[View workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
|
|
|
|
*This is an automated test message. Drive safe! 🚗💨*
|
|
- name: Display results
|
|
if: always()
|
|
run: |
|
|
echo "::notice::Discourse post test completed"
|
|
echo "Check your Discourse topic to verify the post appeared correctly" |