feat: support user handles #392
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: '[Testnet] Reader Main' | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| detect-changes: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| changed: ${{ steps.changes.outputs.reader-main }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Detect reader-main changes | |
| uses: dorny/paths-filter@v3 | |
| id: changes | |
| with: | |
| filters: | | |
| reader-main: | |
| - 'packages/reader-main/**' | |
| build: | |
| needs: [detect-changes] | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.detect-changes.outputs.changed == 'true' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set short SHA | |
| id: sha_short | |
| run: echo "value=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
| - name: Auth GCloud | |
| uses: google-github-actions/auth@v2 | |
| with: | |
| workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITY_PROVIDER }} | |
| service_account: ${{ secrets.SERVICE_ACCOUNT }} | |
| - name: Set up Cloud SDK | |
| uses: google-github-actions/setup-gcloud@v3 | |
| - name: Configure Docker | |
| run: gcloud auth configure-docker ${{ secrets.REGION }}-docker.pkg.dev --quiet | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build and push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ./packages/reader-main/Dockerfile | |
| push: true | |
| tags: | |
| ${{ secrets.REGION }}-docker.pkg.dev/${{ secrets.PROJECT_ID }}/dither-chat/reader-main:${{ steps.sha_short.outputs.value }} | |
| notify: | |
| needs: [build] | |
| if: failure() && needs.build.result != 'skipped' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: appleboy/telegram-action@v1.0.1 | |
| with: | |
| to: ${{ secrets.TELEGRAM_TO }} | |
| token: ${{ secrets.TELEGRAM_BOT_TOKEN }} | |
| format: markdown | |
| message: | | |
| 🚨 *Reader Main Testnet Build Failed* 🚨 | |
| 🔗 *Repository*: [${{ github.repository }}](https://github.com/${{ github.repository }}) | |
| 📝 *Commit*: ${{ github.event.commits[0].message }} | |
| 👤 *Author*: ${{ github.actor }} | |
| ⛓️💥 *App*: ${{ inputs.app_name }} | |
| 🔍 [View Logs](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) | |
| Please investigate and fix *ASAP*! 🔧 |