mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-30 08:20:21 +00:00
fcf3b50f69
Co-authored-by: あく <alleteam@gmail.com>
32 lines
938 B
YAML
32 lines
938 B
YAML
name: 'Post-release hooks'
|
|
|
|
on:
|
|
release:
|
|
types: [prereleased, released]
|
|
|
|
jobs:
|
|
reindex:
|
|
name: 'Post-release hooks'
|
|
runs-on: [self-hosted, FlipperZeroShell]
|
|
steps:
|
|
- name: 'Checkout code'
|
|
uses: actions/checkout@v4
|
|
|
|
- name: 'Trigger reindex'
|
|
run: |
|
|
curl --fail -L -H "Token: ${{ secrets.INDEXER_TOKEN }}" \
|
|
"${{ secrets.INDEXER_URL }}"/firmware/reindex;
|
|
|
|
- name: 'Send release notification'
|
|
if: ${{ github.event.action == 'released' }}
|
|
run: |
|
|
echo '${{ secrets.FIREBASE_TOKEN }}' > firebase-token.json;
|
|
python3 -m pip install firebase-admin==6.4.0;
|
|
python3 scripts/send_firebase_notification.py \
|
|
"--version=${{ github.event.release.name }}" \
|
|
"--token=firebase-token.json";
|
|
|
|
- name: 'Remove firebase token'
|
|
if: always()
|
|
run: |
|
|
rm -rf firebase-token.json;
|