mirror of
https://github.com/jwinterm/grim.git
synced 2026-10-28 01:18:34 +01:00
- 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
42 lines
1.3 KiB
YAML
42 lines
1.3 KiB
YAML
name: Test build
|
|
|
|
on:
|
|
push:
|
|
tags-ignore:
|
|
- "*"
|
|
branches-ignore:
|
|
- master
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu
|
|
steps:
|
|
- 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: ${{ steps.check.outputs.test == 'true' && (success() || failure()) }}
|
|
uses: actions/telegram-notifier@ardocrat
|
|
with:
|
|
token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
|
|
chat_id: ${{ secrets.TELEGRAM_CHANNEL_ID }}
|
|
status: ${{ job.status }}
|
|
notify_fields: "actor,repository,workflow,branch,commit"
|
|
- name: Telegram Notify Group
|
|
if: ${{ steps.check.outputs.test == 'true' && (success() || failure()) }}
|
|
uses: actions/telegram-notifier@ardocrat
|
|
with:
|
|
token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
|
|
chat_id: ${{ secrets.TELEGRAM_GROUP_ID }}
|
|
status: ${{ job.status }}
|
|
notify_fields: "actor,repository,workflow,branch,commit" |