[skip ci] check BOT_TOKEN before step run
This commit is contained in:
13
.github/workflows/build-kernel-5.10.yml
vendored
13
.github/workflows/build-kernel-5.10.yml
vendored
@@ -38,6 +38,15 @@ jobs:
|
||||
name: Build aarch64-${{ matrix.version }}
|
||||
runs-on: ubuntu-latest
|
||||
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:
|
||||
path: KernelSU
|
||||
@@ -125,10 +134,10 @@ jobs:
|
||||
path: android-kernel/out/android12-5.10/dist/boot-gz.img
|
||||
|
||||
- name: Setup mutex for uploading
|
||||
if: github.event_name != 'pull_request'
|
||||
if: github.event_name != 'pull_request' && steps.need_upload.output == 'true'
|
||||
uses: ben-z/gh-action-mutex@v1.0-alpha-7
|
||||
- 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