Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Channel ID from Commit #90

Open
TheKingOfAtlantis opened this issue Mar 8, 2021 · 5 comments · May be fixed by #95
Open

Channel ID from Commit #90

TheKingOfAtlantis opened this issue Mar 8, 2021 · 5 comments · May be fixed by #95
Assignees
Labels
enhancement New feature or request

Comments

@TheKingOfAtlantis
Copy link

Currently have it setup that PR onto the dev or main branch trigger deployment of a preview, but would be great if a preview deployment could be triggered on a merge - Currently no channel id gets generated in this case resulting in an error and a failed action because no channel id is supplied

The sha or subject of the commit on a push could be used to generate the channel Id instead, allowing for this use case

@TheKingOfAtlantis TheKingOfAtlantis added the enhancement New feature or request label Mar 8, 2021
@TheKingOfAtlantis TheKingOfAtlantis linked a pull request Mar 8, 2021 that will close this issue
@jhuleatt jhuleatt self-assigned this Mar 16, 2021
@othondev
Copy link

is there workaround?

@sampi
Copy link

sampi commented Mar 24, 2021

my workaround was to manually specify the channelId, loosely based on the current code: https://github.com/FirebaseExtended/action-hosting-deploy/blob/main/bin/action.min.js#L11267

- name: Deploy to Firebase (preview)
  uses: FirebaseExtended/action-hosting-deploy@v0
  with:
    repoToken: '${{ secrets.GITHUB_TOKEN }}'
    firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT }}'
    expires: 3d
    projectId: my-project-id
    channelId: 'pr-${{ github.event.number }}-${{ github.event.pull_request.head.ref }}'

I get a warning about unsupported characters (/), but the script replaces them with _ so it should be good as a temporary workaround.

@pkanshu
Copy link

pkanshu commented Apr 1, 2021

Any constant channel ID can be provided in channelId key, e.g. preview. It need not be unique as Firebase appends a random hash to the channel ID while generating preview URL (Documentation link)

@afroguy16
Copy link

None of these 'solutions' work.

@xtealer
Copy link

xtealer commented Nov 8, 2021

I use instead https://github.com/w9jds/firebase-action that covers similar functionality and has simpler usage.

@jhuleatt jhuleatt linked a pull request May 24, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants