[skip ci] check BOT_TOKEN before step run
This commit is contained in:
12
.github/workflows/build-manager.yml
vendored
12
.github/workflows/build-manager.yml
vendored
@@ -20,6 +20,14 @@ jobs:
|
||||
run:
|
||||
working-directory: ./manager
|
||||
steps:
|
||||
- name: Setup need_upload
|
||||
id: need_upload
|
||||
run: |
|
||||
if [ ! -z "${{ secrets.BOT_TOKEN }}" ]; then
|
||||
echo "UPLOAD=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "UPLOAD=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
@@ -70,9 +78,9 @@ jobs:
|
||||
path: manager/app/build/outputs/apk/release/*.apk
|
||||
- name: Setup mutex for uploading
|
||||
uses: ben-z/gh-action-mutex@v1.0-alpha-7
|
||||
if: github.event_name != 'pull_request'
|
||||
if: github.event_name != 'pull_request' && steps.need_upload.output == 'true'
|
||||
- name: Upload to telegram
|
||||
if: github.event_name != 'pull_request'
|
||||
if: github.event_name != 'pull_request' && steps.need_upload.output == 'true'
|
||||
env:
|
||||
CHAT_ID: ${{ secrets.CHAT_ID }}
|
||||
CACHE_CHAT_ID: ${{ secrets.CACHE_CHAT_ID }}
|
||||
|
||||
Reference in New Issue
Block a user