Provide commit hash as output? #1272
vincerubinetti
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Context: rossjrw/pr-preview-action#25
This action provides some success/error/etc statuses, but if I understand correctly, these statuses really only apply to the action itself, and whether or not it was successful in committing to the gh-pages branch. There is another step that has to happen, which is GitHub's internal "deployment" workflow run that actually deploys it to their internal servers and confirms that the Pages site (or changes to it) is live. In some cases, such as the
pr-preview-action
linked above which posts a comment on the PR linking to the Pages site, we don't want to show that link just when thegh-pages
branch is committed to, but when that branch is committed to AND the associated Pages deployment has completed.One (sadly hacky) way I thought to do this was to use this API endpoint. In the workflow of interest, I'd periodically check this endpoint, find the Pages build triggered by the commit pushed to the
gh-pages
branch by this action, check its status, and if the status is successful finally continue but otherwise keep checking. This would necessitate knowing the hash of the commit made by this action, so maybe you can provide it as an output of the action?Or maybe this can be a built-in option to this action, e.g. "wait for associated Pages deployment to finish before continuing".
Maybe you can think of a better way?
Beta Was this translation helpful? Give feedback.
All reactions