Skip to content

Commit 4600e36

Browse files
committed
Fix Telegram workflow secret checks in conditions
1 parent b34ff45 commit 4600e36

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/android.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ jobs:
77
build:
88
permissions: write-all
99
runs-on: ubuntu-latest
10+
env:
11+
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
12+
CHANNEL_ID: ${{ secrets.CHANNEL_ID }}
1013
if: github.event_name == 'push' && !contains(github.event.head_commit.message, 'Merge')
1114
steps:
1215
- uses: actions/checkout@v6
@@ -62,7 +65,7 @@ jobs:
6265
tag_name: debug-${{ env.SHORT_SHA }}
6366

6467
- name: Read changelog
65-
if: ${{ success() && github.ref == 'refs/heads/master' && github.ref_type != 'tag' && secrets.BOT_TOKEN != '' }}
68+
if: ${{ success() && github.ref == 'refs/heads/master' && github.ref_type != 'tag' && env.BOT_TOKEN != '' }}
6669
id: changelog
6770
uses: actions/github-script@v8
6871
with:
@@ -72,11 +75,11 @@ jobs:
7275
core.setOutput('content', changelog);
7376
7477
- name: Post to Telegram channel
75-
if: ${{ success() && github.ref == 'refs/heads/master' && github.ref_type != 'tag' && secrets.BOT_TOKEN != '' }}
78+
if: ${{ success() && github.ref == 'refs/heads/master' && github.ref_type != 'tag' && env.BOT_TOKEN != '' }}
7679
uses: Dev4Mod/telegram-github-action@main
7780
with:
78-
to: ${{ secrets.CHANNEL_ID }}
79-
token: ${{ secrets.BOT_TOKEN }}
81+
to: ${{ env.CHANNEL_ID }}
82+
token: ${{ env.BOT_TOKEN }}
8083
format: markdown
8184
disable_web_page_preview: true
8285
message: |

0 commit comments

Comments
 (0)