Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Unexpected failure in GitHub Action run

Aberta
#581 10 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
35/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Estagnada
Stack de tecnologia
git, github-actions
Domínio
ci-cd, devops

Direção de pesquisa

Comece com .github/workflows/book.yml em main e com a versão no pull request #579; em seguida, inspecione a execução do workflow 6003953262 e a etapa actions/checkout que usa github.head_ref. Compare o contexto do evento, o repositório verificado e as refs disponíveis para explicar a falha. O trabalho estará concluído quando forem documentados a versão do workflow e o ref usados, e identificada a configuração necessária para que o workflow do PR seja executado com sucesso.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

Type - Maintenance / Cleanup

In a recent pull request (https://github.com/InnerSourceCommons/InnerSourcePatterns/pull/579), one of our GitHub Action (GHA) workflow runs failed.

Overview of failed GHAs:
Screenshot 2023-08-29 at 09 49 14

Now when looking at the details of that workflow run, I noticed something interesting:

  • when you click on "workflow file", it takes you to the book.yml file from this branch/PR (which comes from a fork)
  • however the file that really got executed is actually the one on the main branch of the upstream. I am so sure about this as the main branch contains the config for a matrix build for this GHA, while the branch from the PR does not have that matrix build yet)

So at the very least I am starting to wonder how GHAs really work. Seems like I might have some misunderstandings here.

My questions are:

  • which GHAs are executed? the ones on the main branch, or the ones on the PR branch, or both?
  • main and PR contain different versions of the same GHA. what happens in that case?

And lastly:
Why does this GHA run fail at all?

It seems like it is looking for a git ref hive-mind-pattern-1 and cannot find it? Possibly because that ref only exists on the fork but not on the upstream?

Do we have to configure the actions/checkout differently, so that it can find that git ref?
Right now we use ref: ${{ github.head_ref }}, which is defined as:

The head_ref or source branch of the pull request in a workflow run. This property is only available when the event that triggers a workflow run is either pull_request or pull_request_target.

I am suspecting that we are checking out the upstream repo InnerSourceCommons/InnerSourcePatterns but then trying to point to a ref that does not exist on that upsream.

Just not sure how one would configure this correctly?

Linguagem predominante
HTML
Estrelas
853
Forks
206
Merge médio
1d 23h
PRs com merge (30d)
2

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de InnerSourceCommons/InnerSourcePatterns

Todas as issues de InnerSourceCommons/InnerSourcePatterns

Issues semelhantes

Mais issues de DevOps

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.