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

Workflow inputs to dynamically deploy to channel #227

Open
iqfareez opened this issue Aug 11, 2022 · 1 comment
Open

Workflow inputs to dynamically deploy to channel #227

iqfareez opened this issue Aug 11, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@iqfareez
Copy link

The use case you're trying to solve

I'm building a a workflow where maintainer can select the channel they want the app is published into. For example, live, staging (long-lived preview), and (new preview)

image

name: Deploy to Firebase Hosting
"on":
  workflow_dispatch:
    inputs:
      deployChannel:
        description: "Channel which Firebase will deploy into"
        default: ""
        type: choice
        options:
          - live
          - staging
          -

... some actions

 - name: Deploy to Firebase Hosting
        uses: FirebaseExtended/action-hosting-deploy@v0
        id: firebaseHost
        with:
          repoToken: "${{ secrets.GITHUB_TOKEN }}"
          firebaseServiceAccount: "${{ secrets.SOME_SECRETS }}"
          channelId: ${{ inputs.deployChannel }} # value from the input above
          projectId: someprojectid

If I understand from the docs, the deploy to a new preview channel, just leave the channelId property empty. I tried to achive that by passing an empty value.

However, on clicking Run workflow. GitHub immediately crashed, seems like it didn't support empty value?

image

@iqfareez iqfareez added the enhancement New feature or request label Aug 11, 2022
@iqfareez iqfareez changed the title GitHub action inputs to dynamically deploy to channel Workflow inputs to dynamically deploy to channel Aug 11, 2022
@Mohammedsahari
Copy link

The use case you're trying to solve

I'm building a a workflow where maintainer can select the channel they want the app is published into. For example, live, staging (long-lived preview), and (new preview)

image

name: Deploy to Firebase Hosting
"on":
  workflow_dispatch:
    inputs:
      deployChannel:
        description: "Channel which Firebase will deploy into"
        default: ""
        type: choice
        options:
          - live
          - staging
          -

... some actions

 - name: Deploy to Firebase Hosting
        uses: FirebaseExtended/action-hosting-deploy@v0
        id: firebaseHost
        with:
          repoToken: "${{ secrets.GITHUB_TOKEN }}"
          firebaseServiceAccount: "${{ secrets.SOME_SECRETS }}"
          channelId: ${{ inputs.deployChannel }} # value from the input above
          projectId: someprojectid

If I understand from the docs, the deploy to a new preview channel, just leave the channelId property empty. I tried to achive that by passing an empty value.

However, on clicking Run workflow. GitHub immediately crashed, seems like it didn't support empty value?

image

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

No branches or pull requests

2 participants