FirebaseExtended / FirebaseExtended/action-hosting-deploy

[BUG] details_url / urls output is not set when deploying with channelId: live

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

Description

Hi!
Ref: https://github.com/FirebaseExtended/action-hosting-deploy/tree/v0/?tab=readme-ov-file#details_url
Seems the Github Actions output is only set when deploying a preview channel.

### Action config
```
- id: firebase-deploy
uses: FirebaseExtended/action-hosting-deploy@v0
with:
firebaseServiceAccount: "${{ env.SERVICE_ACCOUNT_KEY }}"
projectId: ${{ inputs.gcp_project_id }}
entryPoint: ${{ inputs.entry_point }}
channelId: live

- name: Add comment with the web url
if: github.event_name == 'pull_request'
uses: actions/github-script@v7
env:
MESSAGE_BODY: "The firebase hosting site in ${{ inputs.environment }} is available at ${{ steps.firebase-deploy.outputs.details_url }}"
ALL_URLS: ${{ steps.firebase-deploy.outputs.urls }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: process.env.MESSAGE_BODY
});
```

```
{
details_url: 'https://xyz.web.app/',
conclusion: 'success',
output: {
title: 'Production deploy succeeded',
summary: '[xyz.web.app](https://xyz-full.web.app/)'
}
}
```
### Error message

Result:
"MESSAGE_BODY: The firebase hosting site in dev is available at "

- Missing the details_url output string.

### Expected behavior

Expected it to work for both preview and live.

### Actual behavior

This works:
```
- id: firebase-deploy-preview
uses: FirebaseExtended/action-hosting-deploy@v0
with:
firebaseServiceAccount: "${{ env.SERVICE_ACCOUNT_KEY }}"
projectId: ${{ inputs.gcp_project_id }}
entryPoint: ${{ inputs.entry_point }}
expires: ${{ inputs.preview_expire }}

- name: Add comment with preview url
if: github.event_name == 'pull_request'
uses: actions/github-script@v7
env:
MESSAGE_BODY: "Preview for this PR in ${{ inputs.environment }} is available at ${{ steps.firebase-deploy-preview.outputs.details_url }}"
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: process.env.MESSAGE_BODY
});
```
the steps.firebase-deploy-preview.outputs.details_url gets populated :-)

Thanks for reading this far

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.