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

Wait for latest Run #9

Open
sfawcett123 opened this issue Jan 4, 2021 · 1 comment
Open

Wait for latest Run #9

sfawcett123 opened this issue Jan 4, 2021 · 1 comment

Comments

@sfawcett123
Copy link

Great tool however, I have hit an occasional problem.

When I run the action and the waiting action fails. if I re-run the parent action it immediately sees there has been a previous run with a failure and fails, without waiting for the second run.

The code I run is:

       - name: Trigger Development Deployment
         uses: benc-uk/workflow-dispatch@v1.1
         with:
           workflow: Deploy to PaaS
           token: ${{ secrets.ACTIONS_API_ACCESS_TOKEN }}
           inputs: '{"environment": "Development", "sha": "${{ github.sha }}"}'
           ref: ${{github.ref}}

       - name: Wait for Deployment to Development
         uses: fountainhead/action-wait-for-check@v1.0.0
         id: wait-for-deploy
         with:
           token: ${{ secrets.ACTIONS_API_ACCESS_TOKEN}}
           checkName: Deploy Development
           ref: ${{github.ref}}

Retrieving check runs named Deploy Development on DFE-Digital/get-into-teaching-api@refs/heads/master...
Retrieved 1 check runs named Deploy Development
Found a completed check with id 1644407390 and conclusion failure

Is there any chance of a flag that allows 'latest-run: true' so it ignores previous runs?

@bakoontz2
Copy link

By default, listForRef() in poll.ts returns the latest. However, I believe the problem is that without any delay before the call to listForRef(), at times the status from a previous run is returned. See #32 for a proposed solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants