ci: github release fix, do not build on master fork, notify group on pr

- Do not build on master branch fork
- Fix Github release build
- Notify group and channel on PR

Reviewed-on: https://code.gri.mw/GUI/grim/pulls/35
This commit is contained in:
ardocrat
2026-01-23 14:00:34 +01:00
parent 7ebfaaf477
commit 86187e4e59
3 changed files with 18 additions and 3 deletions
+10 -2
View File
@@ -14,10 +14,18 @@ jobs:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Check commit
id: check
run: |
git fetch && git checkout master
sha=$(git rev-parse HEAD)
[[ "${{ github.sha }}" == "${sha}" ]] && test=false || test=true
echo "test=${test}" >> "$FORGEJO_OUTPUT"
- name: Build
if: ${{ steps.check.outputs.test == 'true' }}
run: cargo build --release
- name: Telegram Notify Channel
if: always()
if: ${{ steps.check.outputs.test == 'true' && (success() || failure()) }}
uses: actions/telegram-notifier@ardocrat
with:
token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
@@ -25,7 +33,7 @@ jobs:
status: ${{ job.status }}
notify_fields: "actor,repository,workflow,branch,commit"
- name: Telegram Notify Group
if: always()
if: ${{ steps.check.outputs.test == 'true' && (success() || failure()) }}
uses: actions/telegram-notifier@ardocrat
with:
token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
+7
View File
@@ -17,4 +17,11 @@ jobs:
token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
chat_id: ${{ secrets.TELEGRAM_CHANNEL_ID }}
status: ${{ job.status }}
notify_fields: "actor,repository"
- name: Telegram Notify Group
uses: actions/telegram-notifier@ardocrat
with:
token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
chat_id: ${{ secrets.TELEGRAM_GROUP_ID }}
status: ${{ job.status }}
notify_fields: "actor,repository"
+1 -1
View File
@@ -15,7 +15,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Download release
run: chmod +x .github/download_release.sh && .github/download_release.sh ${{ github.repository }} ${{ github.ref_name }}
run: chmod +x .github/download_release.sh && .github/download_release.sh GUI/grim ${{ github.ref_name }}
- name: Release
uses: softprops/action-gh-release@v2
with: