Support setting a post hook
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 45/100
- Tipo de issue
- Funcionalidade
- Clareza
- Razoavelmente clara
- Status de atividade
- Estagnada
- Stack de tecnologia
- github-actions, javascript, node.js, typescript
Direção de pesquisa
Start by tracing the existing github-script action entry point and how it handles the script input, then compare the node20 post-hook model and core.saveState behavior described in the issue. Done means a new post input runs cleanup after the job while preserving existing usage and supporting shared state.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
A post hook is supported by node20 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 additional post input.
The change would be fully backwards compatible and not too disruptive.
Usage would look like this:
- name: My github script
uses: actions/github-script@v7
with:
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 by core.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 with
if: 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)
- Linguagem predominante
- TypeScript
- Estrelas
- 5k
- Forks
- 586
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de actions/github-script
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 48/100
actions/github-script#728 ·
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 52/100
actions/github-script#727 · 1 reação ·
-
{ Aberta
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 10/100
actions/github-script#724 ·
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 55/100
actions/github-script#723 · 1 comentário ·
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 55/100
actions/github-script#714 · 1 comentário · 4 reações ·
Todas as issues de actions/github-script
Issues semelhantes
-
blocklist removal
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
MetaMask/eth-phishing-detect#296544 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
pastelsky/bundlephobia#1122 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
-
category/development priority/P2 scope/file-operations scope/testing type/enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100