Hi, I want to be able to input any value using wor...
# dagster-plus
Hi, I want to be able to input any value using workflow_dispatch in dagster cloud’s hybrid branch deployment, but I cannot get the value of INPUT_PR (github.event.number) and it fails to execute. Is there a better way to do this?
To check that I’m following: • you’re setting
on your dagster cloud github action • when you trigger it manually,
is empty or errors?
Here’s a likely related github issue with a hacky solution https://github.com/actions/checkout/issues/58#issuecomment-1105511377
Thank you ! When I use workflow_dispatch, github.event.number is empty. And INPUT_PR is based on the value of github.event.number, so it fails with the following error.
Copy code
Traceback (most recent call last):
  File "/create_or_update_comment.py", line 81, in <module>
  File "/create_or_update_comment.py", line 22, in main
    pr_id = int(os.getenv("INPUT_PR"))
ValueError: invalid literal for int() with base 10: ''
When using workflow_dispatch, I want to assign a temporary value to INPUT_PR, but it does not work. For now, I think the only solution is to create a separate action that does not use INPUT_PR.
I did not read it carefully, but I have already tried both the method you provided and redirecting to $GITHUB_ENV and the result is the same. This process, which always passes in hybryd_branch_deploy, gets the value of pr from github.event.number, but in the case of workflow_dispatch, github.event.number is empty.
Copy code
- name: Deploy to Dagster Cloud
      uses: ./action-repo/actions/utils/deploy
      id: deploy
        organization_id: ${{ inputs.organization_id }}
        pr: "${{ github.event.number }}"
        pr_status: "${{ github.event.pull_request.merged && 'merged' || github.event.pull_request.state }}"
        location: ${{ inputs.location }}
        image_tag: ${{ github.sha }}-${{ github.run_id }}-${{ github.run_attempt }}
        DAGSTER_CLOUD_API_TOKEN: ${{ inputs.dagster_cloud_api_token }}
For example, we would be happy to be able to manually deploy with workflow_dispatch in an environment that uses MFA code in AWS. I’ll list it in the github issue.
I had a similar issue and my workaround was to fork the action repo and make some changes to also take a few metadata fields like input PR from the dispatch event https://github.com/voxmedia/dagster-cloud-action
❤️ 1