Skip to content

Commit

Permalink
Tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaobozhen committed Dec 16, 2023
1 parent a1a67c8 commit 29c71cf
Showing 1 changed file with 13 additions and 52 deletions.
65 changes: 13 additions & 52 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,21 @@ env:
jobs:
check:
name: Check
runs-on: self-hosted
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: oNaiPs/secrets-to-env-action@v1
with:
secrets: ${{ toJSON(secrets) }}
- name: python print secret
env:
MY_VAL: ${{ secrets.SUPER_SECRET }}
run: |
import os
for q in (os.getenv("MY_VAL")):
print(q)
shell: python
- name: Skip duplicate actions
uses: fkirc/skip-duplicate-actions@v5
with:
Expand Down Expand Up @@ -116,54 +127,4 @@ jobs:
with:
command: appcenter crashes upload-mappings --mapping app/build/outputs/mapping/marketRelease/mapping.txt --version-name ${{ steps.apk-info.outputs.version-name }} --version-code ${{ steps.apk-info.outputs.version-code }} --app zhaobozhen2025-gmail.com/LibChecker
token: ${{secrets.APP_CENTER_TOKEN}}
- name: Send commit to telegram
if: success() && github.repository == 'LibChecker/LibChecker' && github.event_name != 'pull_request' && github.ref == 'refs/heads/master'
env:
CHANNEL_ID: ${{ secrets.TELEGRAM_TO }}
BOT_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
FOSS_FILE: ${{ steps.apk-path.outputs.foss_path }}
MARKET_FILE: ${{ steps.apk-path.outputs.market_path }}
COMMIT_MESSAGE: |+
New push to github\!
```
${{ github.event.head_commit.message }}
```by `${{ github.event.head_commit.author.name }}`
See commit detail [here](${{ github.event.head_commit.url }})
Snapshot apk is attached
run: |
ESCAPED=`python3 -c 'import json,os,urllib.parse; print(urllib.parse.quote(json.dumps(os.environ["COMMIT_MESSAGE"])))'`
curl -v "https://api.telegram.org/bot${BOT_TOKEN}/sendMediaGroup?chat_id=${CHANNEL_ID}&media=%5B%7B%22type%22%3A%22document%22%2C%20%22media%22%3A%22attach%3A%2F%2FmarketRelease%22%2C%22parse_mode%22%3A%22MarkdownV2%22%2C%22caption%22:${ESCAPED}%7D%5D" -F marketRelease="@$MARKET_FILE"
skipped:
runs-on: self-hosted
if: ${{ startsWith(github.event.head_commit.message, '[skip ci]') }}
steps:
- uses: actions/checkout@v4
- name: Send commit to telegram
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
format: markdown
message: |+
New push to github!
*${{ github.event.head_commit.message }}* by ${{ github.event.head_commit.author.name }}
See commit detail [here](${{ github.event.head_commit.url }})
This push skipped building
cancelled:
runs-on: self-hosted
if: ${{ cancelled() && github.repository == 'LibChecker/LibChecker' && github.event_name != 'pull_request' && github.ref == 'refs/heads/master' }}
needs: [check, build]
steps:
- name: Send commit to telegram if cancelled
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
format: markdown
message: |+
New push to github!
*${{ github.event.head_commit.message }}* by ${{ github.event.head_commit.author.name }}
See commit detail [here](${{ github.event.head_commit.url }})
This push cancelled building

0 comments on commit 29c71cf

Please sign in to comment.