Skip to content

Input required and not supplied: deployment_id #161

@drewbietron

Description

@drewbietron

I am updating this to version 1 and am having trouble with the deployment_id. I have tried many combinations of values for it and I cannot seem to get this to work. I have tried (or thought I did) what the docs explain, as well as trying other values. The closest I've got is just by hardcoding a value (eg 123) as the deployment_id, but that throws other errors.

Here is my current config

 steps:
      - uses: actions/checkout@v3
      - name: Start Web Preview Deployment
        uses: bobheadxi/deployments@v1
        id: deployment
        with:
          step: start
          token: ${{ secrets.GITHUB_TOKEN }}
          env: ${{ fromJSON('["Production", "Preview"]')[github.ref != 'refs/heads/main'] }}
          deployment_id: ${{ github.event.deployment.id }}
      - name: Web Preview Build
        uses: actions/setup-node@v1
        with:
          node-version: "14.x"
      - name: Deploy
        ... deploy steps
      - name: Update Web Preview Deployment Status
        uses: bobheadxi/deployments@v1
        if: always()
        with:
          step: finish
          token: ${{ secrets.GITHUB_TOKEN }}
          status: ${{ job.status }}
          env: ${{ fromJSON('["Production", "Preview"]')[github.ref != 'refs/heads/main'] }}
          deployment_id: ${{ github.event.deployment.id }}
          debug: true

The output for the debug is

Run bobheadxi/deployments@v1
  with:
    step: finish
    token: ***
    status: failure
    env: Preview
    debug: true
    auto_inactive: false

deployment_id isnt there. Its there if I hard code 123 but my suspicion is that what Im using for the deployment_id isnt a thing.

When I try a value that shows up in debug (eg deployment_id: ${{ github.ref }}), I get the following error

Preview: found 100 existing deployments for env
Preview.1251784709: setting deployment (1dd4c5b78a8100f2d44b56ef848fc652ce3bb144) state to "inactive"
Preview.1251784709 is already inactive; skipping.

Any help would be appreciated 🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions