mirror of
https://code.gri.mw/GUI/grim.git
synced 2026-07-10 17:04:10 +00:00
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:
@@ -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 }}
|
||||
|
||||
@@ -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"
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user