fountainhead / action-wait-for-check Goto Github PK
View Code? Open in Web Editor NEWA GitHub Action that waits for another Check Run to have completed
License: MIT License
A GitHub Action that waits for another Check Run to have completed
License: MIT License
Github will be deprecating Node 12 actions at some point in the summer, I can throw together a PR for this if that works
https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/
Not exactly an issue with this project, but does anyone know why the check run statuses that github returns are inconsistent? Sometimes "completed" is returned, even though the action being waited on is clearly not complete. Other times, it's clear that "in-progress" is correctly returned (based on logging the result from the listForRef call). More importantly, is there a fix that can be applied to this code to ensure the most up-to-date check status is returned?
The best solution I've found so far is to (1) add a delay prior to the call to listForRef() and (2) set the per_page argument to listForRef() to 1. (I don't know how to actually build this, so I'm just hacking index.js.) A proper build can be found in #33.
For example, if I have multiple workflows and they all have a job named test
. Is it possible to wait for all of them to finish? For now, I think it only waits for one of them to finish.
Retrieved 6 check runs named test
Found a completed check with id xxxxxx and conclusion success
I am trying to understand how to correctly use checkName
.
I have a workflow A which build
s my app and creates a preview of said app under a Github page.
I would like to wait for A to be done, so that I can start workflow B to visit the URL of that page.
I tried using the job name, the step name, added a step id... but to no avail so far. It always says
Retrieving check runs named build on Primajin/genshin-farming-helper@961014fdf4bafdb21ccedb58bf26d1824ff3...
Retrieved 0 check runs named build
No completed checks named build, waiting for 10 seconds...
[...]
Do I need to add anything else so that it doesn't wait for something called build
in the current workflow, but in all / a different one?
Github will be deprecating set-output
and save-state
on May 31, 2023. I can also throw up a PR for this one
https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Hello. I got this error. What do I do?
Error: API rate limit exceeded for installation ID 8440595
I added the following snippet to my .github/workflows/release.yml
, based on the marketplace docs docs.
- name: Wait for build to succeed
uses: fountainhead/[email protected]
id: wait-for-build
with:
token: ${{ secrets.GITHUB_TOKEN }}
checkName: Go
Output:
Download action repository 'fountainhead/[email protected]'
##[warning]Failed to download action 'https://api.github.com/repos/fountainhead/action-wait-for-check/tarball/1.0.0'. Error Response status code does not indicate success: 404 (Not Found).
##[warning]Back off 19.757 seconds before retry.
##[warning]Failed to download action 'https://api.github.com/repos/fountainhead/action-wait-for-check/tarball/1.0.0'. Error Response status code does not indicate success: 404 (Not Found).
##[warning]Back off 22.384 seconds before retry.
##[error]Response status code does not indicate success: 404 (Not Found).
Not sure if the github release needs a certain binary file or sthg.
How do I use this to check an action on a push of a certain tag, when I only know the tag name?
Hi,
I'm trying to check the CircleCi events, is it possible to check for this kind of event using this gh action?
Thanks.
I am using this action to determine when another workflow finishes so I can download artifacts from it. When the workflow finishes and this action exits cleanly, it appears as though the artifacts are not ready and the workflow fails saying that the artifact doesn't exist.
Is there a way around this? I realize this might not be this action's responsibility. Perhaps the API is showing the run as complete before the artifacts are available? Is there a way for this action to check for that?
Hello. I got this error. What do I do?
Error: API rate limit exceeded for installation ID 8440595
Hi,
Seems this action is still actively used, but perhaps not maintained.
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: fountainhead/[email protected]. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Hi there! Awesome package by the way. I just can't seem to get it to work :) I'm waiting for this check to pass on a PR:
As you can see, it has completed.
And have setup this action as follows:
But it just sits there and polls forever.
I have tried the github.pull_request.head.sha
option for the ref
as well with no luck. Any ideas?
Thank you!
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/[email protected]
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/[email protected]
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?
Are GHE instances supported with the current code?
I have workflow with two jobs, second job at some step waits for first job to finish. Everything works as expected if
on:
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:
but if I delete this pull_request trigger and leave only
on:
workflow_dispatch:
wait step could not get info and prints
Retrieved 0 check runs named ...
Any suggestions?
Lets say i have a ./.github/workflows/main.yml
file, this file runs all the pull-request checks and tests. But then i have another workflow file (./.github/workflows/other.yml
). I would like to run this workflow other.yml
after this workflow main.yml
. But other.yml
would only run if main.yml
does not fail. How would i implement that with this action? I could not find any documentation of how to implement this outside one file. The reason i would like to do this with two files is because they have different events. And if i combine them it would be like a circular dependencies.
Can anybody clear things up for me? Sorry if its a stupid question because in kinda newbie in ci/cd
Works great!
Thank you so much for this awesome work.
I have a special case where not always run all dependent workflows, in this case, the Job with the action keeps waiting 600 sec until timeout. ¿There is a way to handle this?
If the root workflow is skipped, the second workflow with the action must continue without waiting for the timeout.
Thank you for your help.
The checkName
parameter should be optional. If it is not provided, then the action should wait for all checks for a specified commit to pass.
If waiting for a series of checks run against a matrix (i.e. tests), you have to add a check step for each individual job in that matrix.
Example workflow snippet:
- name: Check acceptance test results (helm)
uses: fountainhead/[email protected]
id: acceptance-helm-1-13-12
with:
token: ${{ secrets.GITHUB_TOKEN }}
checkName: "Acceptance-Helm (v1.13.12)"
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Check acceptance test results (helm)
uses: fountainhead/[email protected]
id: acceptance-helm-1-18-0
with:
token: ${{ secrets.GITHUB_TOKEN }}
checkName: "Acceptance-Helm (v1.18.0)"
ref: ${{ github.event.pull_request.head.sha || github.sha }}
Could someone please elaborate on the below documentation. What is this actually referring to what name is it checking? Branch Name, Repo Name?
checkName
Required
The name of the GitHub check to wait for. For example, build
or deploy
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.