FirebaseExtended / FirebaseExtended/action-hosting-deploy

Separate GitHub Action Messages for Different Preview URLs

Open
#384 0 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
809
Forks
232
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
When deploying multiple preview channels (e.g., development and production) within a single GitHub Actions workflow, the bot currently updates a single comment in the PR conversation. Initially, it posts the production URL and then edits the same comment to include the development URL. This can be confusing and leads to a less clear separation of information.

**Expected behavior**
The ideal behavior would be for the bot to create separate comments for each preview URL. This ensures clarity and improves the PR review process by distinctly separating the URLs for different environments (e.g., development and production).

**Steps to reproduce**

1. Set up a GitHub Actions workflow to deploy both development and production versions of an application using FirebaseExtended/action-hosting-deploy.
2. Trigger the workflow on a pull request.
3. Observe that the bot updates a single comment with both URLs, rather than creating separate comments for each URL.
4. Proposed solution
5. Modify the action to create separate comments for each deployment when multiple preview channels are deployed within the same workflow. This would enhance the readability and organization of the PR conversation, especially in complex projects with multiple environments.

**Example workflow snippet**
```
deploy_dev:
name: "Deploy DEV"
runs-on: ubuntu-latest
needs: build_dev
steps:
- name: 📚 Checkout repo
uses: actions/checkout@v4

- name: ⬇️ Download Development Artifact
uses: actions/download-artifact@master
with:
name: build-dev
path: build/web

- name: 🎯 Deploy to firebase (Preview - DEV)
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT }}"
projectId: my-project-id
channelId: dev-${{ github.event.pull_request.number }}
expires: 30d

deploy_prod:
name: "Deploy PROD"
runs-on: ubuntu-latest
needs: build_prod
steps:
- name: 📚 Checkout repo
uses: actions/checkout@v4

- name: ⬇️ Download Production Artifact
uses: actions/download-artifact@master
with:
name: build-prod
path: build/web

- name: 🎯 Deploy to firebase (Preview - PROD)
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT }}"
projectId: my-project-id
channelId: prod-${{ github.event.pull_request.number }}
expires: 30d
```

Contributor guide

Open the contributing guide

Research direction

No files or tests are named in the issue. Start by locating the GitHub Actions pull-request comment creation and update logic, then reproduce the workflow with separate development and production channel deployments. Done means each preview deployment creates its own PR comment instead of combining URLs in one comment.

Written by the indexing model from the issue text.

Assessment

Tech stack
firebase, github-actions, typescript
Domain
ci-cd, cloud, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.