ncipollo / release-action

An action which manages a github release

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Release not triggering a release event in Github.

RobertoLillo opened this issue · comments

Describe the bug
Right now I'm trying to setup an auto release in case of a hotfix in our company, the designed pipeline goes something like this:

  1. We create a tag using this action (we have a fork of this updated to Node20).
  2. We build our app using docker, this creates an image of the front and backend of the application and then pushes it to AWS ECR.
  3. We have a final "Success" job that runs depending if the second job ended correctly, there's one special step that runs on the condition that if the commit contains the word "HOTFIX:" it will use this action to automatically do a release of the tag generated in job 1.

As far as that point it works correctly, in fact the latest release is updated with the expected tag.

The thing is we have another workflow in charge of deploying our app with the condition on: push: [released] that is not being triggered by the releases done by this action, I tried manually releasing a tag and it works as expected but it doesn't when the action is the one doing the release. I tried using [published] too since it considers released and prereleased but it didn't work either.

Is this expected behavior? I can only assume is something not dispatching the Release Event described here, but I would love to know more about it.

To Reproduce
Steps to reproduce the behavior:

  1. Generate a tag.
  2. Have a workflow do a release with this action.
    2.1. makeLatest: true
    2.2. tag: the one created by the first job
    2.3 name: something
    2.4 body: something (I think Github updated this and now the body is always required to do a release).
  3. Have a workflow that triggers when a release is released or published.

Expected behavior
The release created by this action should dispatch an event that triggers a workflow that depends on releases being created.

Additional context
We are using github-runners on Ubuntu-22.04.

This isn't behavior which would be governed by the action, this is something within Github's system.

That being said, I think this might solvable for you. By default Github will not let you trigger one workflow from and event generated by another. This is to avoid creating workflow loops. It looks like they have a way to bypass this behavior now: https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow