unleashed-firmware/.github/workflows/reindex.yml
Max Andreev fcf3b50f69
Add notification sending (#3449)
Co-authored-by: あく <alleteam@gmail.com>
2024-02-17 14:32:32 +07:00

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;