Repository navigation
64 lines (58 loc) · 2.46 KB
/
Copy pathnotification.yml
File metadata and controls
64 lines (58 loc) · 2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Telegram Notification
on:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.workflow_run.head_branch || github.ref }}
cancel-in-progress: true
jobs:
notification:
runs-on: ubuntu-26.04
permissions:
actions: read
contents: read
steps:
- name: Configure GitLab submodule credentials
env:
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
run: |
if [[ -z "$GITLAB_TOKEN" ]]; then
echo "::error::GITLAB_TOKEN secret is not set; cannot clone gitlab.com submodules"
exit 1
fi
git config --global http.https://gitlab.com/.extraheader "AUTHORIZATION: basic $(printf 'oauth2:%s' "$GITLAB_TOKEN" | base64 -w0)"
- uses: actions/checkout@v7
with:
submodules: recursive
fetch-depth: 0
- uses: ./.github/actions/resolve-ci-toolkit
with:
ref: b2d1d58abfca674a60277ba302d06eae45da3ce4
- name: Download artifacts
if: github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'beta'
uses: actions/download-artifact@v8
with:
run-id: ${{ github.event.workflow_run.id }}
path: artifacts
github-token: ${{ github.token }}
- name: Send Notification
env:
RELEASE_TAG: ${{ github.event.release.tag_name }}
ASSETS_JSON: ${{ toJson(github.event.release.assets) }}
TG_CHAT_ID: ${{ secrets.TG_CHAT_ID }}
TG_THREAD_ID: ${{ secrets.TG_THREAD_ID }}
TG_CI_THREAD_ID: ${{ secrets.TG_CI_THREAD_ID }}
TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }}
EVENT_NAME: ${{ github.event_name }}
WF_RUN_ID: ${{ github.event.workflow_run.id }}
WF_RUN_URL: ${{ github.event.workflow_run.html_url }}
WF_RUN_CONCLUSION: ${{ github.event.workflow_run.conclusion }}
WF_RUN_NAME: ${{ github.event.workflow_run.name }}
WF_RUN_SHA: ${{ github.event.workflow_run.head_sha }}
WF_RUN_REPO: ${{ github.repository }}
WF_RUN_BRANCH: ${{ github.event.workflow_run.head_branch }}
CI_COMMIT_TITLE: ${{ github.event.workflow_run.display_title }}
GH_TOKEN: ${{ github.token }}
PROJECT_TAG: '📌 #XposedSmsCode'
CI_BRANCH: 'beta'
RELEASE_NOTES_SOURCE: 'docs/CHANGELOG.md'
run: bash .magisk-ci-toolkit/github/send_telegram_notification.sh