Bump w9jds/firebase-action from 15.17.0 to 15.18.0 (#303) #196
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: Deploy | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build-container: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| image: ${{ steps.build.outputs.image }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Authenticate to Google Cloud | |
| uses: google-github-actions/auth@v3 | |
| with: | |
| credentials_json: ${{ secrets.DEPLOYER_SERVICE_ACCOUNT }} | |
| - name: Set up Cloud SDK | |
| uses: google-github-actions/setup-gcloud@v3 | |
| - name: Configure Docker for Google Cloud | |
| run: gcloud auth configure-docker gcr.io | |
| - name: Build Container Image | |
| id: build | |
| run: | | |
| cd functions | |
| IMAGE_TAG="gcr.io/home-assistant-mobile-apps/mobile-push:${{ github.sha }}" | |
| gcloud builds submit --tag $IMAGE_TAG | |
| echo "image=$IMAGE_TAG" >> $GITHUB_OUTPUT | |
| deploy-cloud-run: | |
| needs: build-container | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Authenticate to Google Cloud | |
| uses: google-github-actions/auth@v3 | |
| with: | |
| credentials_json: ${{ secrets.DEPLOYER_SERVICE_ACCOUNT }} | |
| - name: Deploy to Cloud Run | |
| uses: google-github-actions/deploy-cloudrun@v3 | |
| with: | |
| service: mobile-push | |
| image: ${{ needs.build-container.outputs.image }} | |
| region: us-central1 | |
| flags: | | |
| --allow-unauthenticated | |
| --vpc-connector=${{ secrets.VPC_CONNECTOR }} | |
| deploy-hosting: | |
| needs: deploy-cloud-run | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Deploy to Firebase | |
| uses: w9jds/firebase-action@v15.18.0 | |
| with: | |
| args: deploy --only hosting | |
| env: | |
| GCP_SA_KEY: ${{ secrets.DEPLOYER_SERVICE_ACCOUNT }} |