trigger-circleci-pipeline-action icon indicating copy to clipboard operation
trigger-circleci-pipeline-action copied to clipboard

Request: Wait-for-pipeline input variable

Open LecrisUT opened this issue 1 year ago • 0 comments

Is there an existing issue that is already proposing this?

  • [X] I have searched the existing issues

Is your feature request related to a problem? Please describe it

Although currently you could write up a requester that would query for the status of the job, e.g.:

      - name: Trigger CircleCI
        id: circle-ci
        uses: CircleCI-Public/[email protected]
        env:
          CCI_TOKEN: ${{ secrets.CCI_TOKEN }}
      - name: Wait for CircleCI
        uses: mydea/action-wait-for-api@v1
        with:
          timeout: 3600
          url: https://circleci.com/api/v2/project/gh/owner/projectjob/${{ steps.circle-ci.outputs.number }}
          expected-status: 200
          expected-response-field: status
          expected-response-field-value: success

It is hard to generalize to check for other statuses like failed, etc.

Describe the solution you'd like

Instead it would be nice to have the code be re-used to wait for the pipeline to complete, e.g.:

      - name: Trigger CircleCI
        id: circle-ci
        uses: CircleCI-Public/[email protected]
        env:
          CCI_TOKEN: ${{ secrets.CCI_TOKEN }}
        with:
          wait_for_pipeline: true

LecrisUT avatar Aug 23 '23 14:08 LecrisUT