Annotations, how to create them?

As title.
Is it possible to create annotations? If yes, how?


You can use the following Workflow commands to create W** arning  and Error** annotations in the workflow:

Setting a warning message

for example:

- name: Generate Warning Annotations
  run: |
    text="This is a Warning"
    echo "::warning file=app.js,line=1,col=5::$text"

◆ Setting an error message

for example:

- name: Generate Error Annotations
  run: |
    text="This is an Error"
    echo "::error file=app.js,line=10,col=15::$text"


NOTE:  currently, GitHub Actions does not support too much annotations in a workflow run, the below is a summary of the limitation:

  • 10 warning annotations and 10 error annotations for per step
  • 50 annotations for per job (sum of annotations from all the steps)
  • 50 annotations for per workflow run (separate from the job annotations, these annotations aren’t created by users)

thanks for the reply.

is there a simple INFO annotations?

@sblantipodi ,

is there a simple INFO annotations?

Sorry, what do you mean about “a simple INFO annotations”? I’m not very clear your meaning.

it’s not an error, it’s not a warning, it’s a simple message that says:

“Hey, COOL, your build is under 400KB.”

It’s an informative message, no warning, no errors.

1 Like

@sblantipodi ,

Currently, we seems only can set  Error or Warning messages to display on the Annotations section in a workflow run.

Actually I’m not sure if it supports other types messages, such as such as Information or Notice.

I have reported this question to the appropriate engineering team for further discussion. If they have any response, I will notify you in time, and sometimes the appropriate engineers may directly reply you here.

1 Like

love this team! thanks

@sblantipodi ,

Sorry for late response.

According to the reply from the appropriate engineering team, currently only  Error  and  Warning  are supported on the  Annotations.

Maybe, a as workaround, you can consider using  Warning  to show the information you want.

If your projects really need more message types on Annotations , I recommend you directly report a feature request here. That will allow you to directly interact with the appropriate engineering team, and make it more convenient for the engineering team to collect and categorize your suggestions.

1 Like

I’m so impressed for the service, I really appreciate you answer.