Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Support setting a post hook #592

Open
@gnpar

Description

@gnpar

Is your feature request related to a problem? Please describe.
With actions/github script it's not possible to setup some cleanup logic to run at the end of the job.

Describe the solution you'd like
Apost hook is supported bynode20 actions. Adding support for this would not be too difficult on github-script, as it's just a separate function that can be set on an additionalpost input.

The change would be fully backwards compatible and not too disruptive.

Usage would look like this:

    -name:My github scriptuses:actions/github-script@v7with:script:|          console.log("Running my github script");post:|          console.log("Running cleanup logic for my github script");

State sharing between both scripts would be supported out of the box bycore.saveState, so this would be a very powerful addition.

I'm willing to work on a PR for this feature in the next few days.

Describe alternatives you've considered

  • Using an additional action withif: always() for cleanup, this requires putting the cleanup step at the end of the job, potentially far from the step it's cleaning after.
  • Using a node action directly: this would require duplicating parts of this project for toolkit set up.

Additional context

Use case where the need for this has come up: creating a "check" (github.rest.checks.create) at the beginning of a job, and making sure the check is marked as completed at the end (either with success or failure based on the job status)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp