[codex] Add server-backed fiat rate cache (#242) #258
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Telegram Notification | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - "client/**" | |
| - "scripts/**" | |
| - "package.json" | |
| - "bun.lock" | |
| - ".github/workflows/**" | |
| - "!**/*.md" | |
| jobs: | |
| build: | |
| name: Build Android App | |
| uses: ./.github/workflows/client.yml | |
| secrets: inherit | |
| send_telegram_notification: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: π₯ Download APK artifact | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: ${{ needs.build.outputs.apk_artifact_name }} | |
| path: . | |
| - name: π Start local Telegram Bot API server | |
| run: | | |
| docker run -d --name local-bot-api \ | |
| -p 8081:8081 \ | |
| -v ${{ github.workspace }}:/data \ | |
| -e TELEGRAM_API_ID=${{ secrets.TELEGRAM_API_ID }} \ | |
| -e TELEGRAM_API_HASH=${{ secrets.TELEGRAM_API_HASH }} \ | |
| aiogram/telegram-bot-api:latest --local | |
| - name: β³ Wait for Bot API server to be ready | |
| run: | | |
| echo "Waiting 5 seconds for the local Bot API server to initialize..." | |
| sleep 5 | |
| - name: π€ Send APK using local Bot API server | |
| run: | | |
| curl -s -X POST "http://localhost:8081/bot${{ secrets.TELEGRAM_TOKEN }}/sendDocument" \ | |
| -F chat_id="${{ secrets.BLIXT_CHAT_ID }}" \ | |
| -F message_thread_id="${{ secrets.BLIXT_TOPIC_ID }}" \ | |
| -F document=@"${{ needs.build.outputs.apk_filename }}" \ | |
| -F caption="π€ New Noah Android build is available! | |
| π Commit: ${{ github.sha }} | |
| π¬ Message: ${{ github.event.head_commit.message }}" | |
| - name: π Stop and remove local Bot API server | |
| if: always() | |
| run: | | |
| echo "Stopping and removing the Docker container..." | |
| docker stop local-bot-api | |
| docker rm local-bot-api |