action-hosting-deploy icon indicating copy to clipboard operation
action-hosting-deploy copied to clipboard

Only one preview url is generated for multisite

Open nwaughachukwuma opened this issue 3 years ago • 1 comments

With 2 workflow.yml files, each one meant to deploy to a hosting channel for a site on a firebase project, only one comment post with deploy preview url is possible on the pull_request. Also, the preview url of the workflow that finishes last overwrites that posted by the first one.

# workflow 1
- uses: FirebaseExtended/action-hosting-deploy@v0
  with:
      repoToken: '${{ secrets.GITHUB_TOKEN }}'
      firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT }}'
      projectId: '${{ secrets.PROJECT_ID }}'
      channelId: '${{ gitHub.sha }}-c1'
      target: TARGET_NAME_1
# workflow 2
- uses: FirebaseExtended/action-hosting-deploy@v0
  with:
      repoToken: '${{ secrets.GITHUB_TOKEN }}'
      firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT }}'
      projectId: '${{ secrets.PROJECT_ID }}'
      channelId: '${{ gitHub.sha }}-c2'
      target: TARGET_NAME_2

nwaughachukwuma avatar Jul 23 '21 10:07 nwaughachukwuma

I think this was fixed in #52, which was merged in 8e03296fa6512f4b53ad6c39ddcfbe34d7104d4e.

That isn't included in the latest release, v0, which is instead at commit 276388dd6c2cde23455b30293105cc866c22282d.

To fix this, we explicitly use the github action at the latest commit to main, which at time of writing is 0f248036885ae672f78587669fa2923f0ef6cac2:

-    uses: FirebaseExtended/action-hosting-deploy@v0
+    uses: FirebaseExtended/action-hosting-deploy@0f248036885ae672f78587669fa2923f0ef6cac2

You'll know you're on the new version if the bot comments include the Sign: line at the bottom:

image

For us, two separate workflows now produce two separate comments 🎉

(I suppose a longer-term fix would be to update v0 to point at a newer commit on main, but I'm not familiar with that process)

tcrwt avatar Sep 17 '21 13:09 tcrwt