Badge shows "no status" and no status mismatch between the filepath vs name usage

I’m trying to now set some badges for my travis like I used to do with Travis.

Following https://help.github.com/en/actions/automating-your-workflow-with-github-actions/configuring-a-workflow#adding-a-workflow-status-badge-to-your-repository, I’m trying to set a badge for my default “CI” named workflow:

As I speak, its current status is:

* the last 5 builds on the master branch passes. (+ some on forked branch)

* one build is running.

I would expect:

  1. filename and name syntax to match

  2. boths to returns passing, as the current status on https://github.com/ubuntu/zsys/actions?query=workflow%3ACI.

For reference, the workflow file: https://github.com/ubuntu/zsys/blob/master/.github/workflows/repo-quality.yaml

Other workflow files in the same repository, which are “push: master”, shows the same pattern (no status when using name and incorrect failing status when filename is used).

Is there anything I’m doing wrong?

EDIT: now that the current CI job finished, the named version “CI” returns the correct status. However, the file path doesn’t, despite emptying the browser cache.

Thank you for posting this issue.

If your workflow has a name, you need to use name in your badge to get workflow status. This is the only way. If your workflow doesn’t have a name, you can reference the workflow file using the file path relative to the repository’s root directory.

Please refer to this document: https://help.github.com/en/actions/automating-your-workflow-with-github-actions/configuring-a-workflow#adding-a-workflow-status-badge-to-your-repository

I checked your workflow, it has a name, so please use https://github.com/ubuntu/zsys/workflows/CI/badge.svg to show its status.

>>- Using the filename path syntax: https://github.com/ubuntu/zsys/workflows/.github/workflows/repo-quality.yaml/badge.svg__, the returned status is “failing”.

 

For this question, I checked your all workflow list https://github.com/ubuntu/zsys/actions, I found that there is a record named .github/workflows/repo-quality.yaml

When you use https://github.com/ubuntu/zsys/workflows/.github/workflows/repo-quality.yaml/badge.svg,  it always shows this workflow run status> failed.

Thank you for posting this issue.

If your workflow has a name, you need to use name in your badge to get workflow status. This is the only way. If your workflow doesn’t have a name, you can reference the workflow file using the file path relative to the repository’s root directory.

Please refer to this document: https://help.github.com/en/actions/automating-your-workflow-with-github-actions/configuring-a-workflow#adding-a-workflow-status-badge-to-your-repository

I checked your workflow, it has a name, so please use https://github.com/ubuntu/zsys/workflows/CI/badge.svg to show its status.

>>- Using the filename path syntax: https://github.com/ubuntu/zsys/workflows/.github/workflows/repo-quality.yaml/badge.svg__, the returned status is “failing”.

 

For this question, I checked your all workflow list https://github.com/ubuntu/zsys/actions, I found that there is a record named .github/workflows/repo-quality.yaml

When you use https://github.com/ubuntu/zsys/workflows/.github/workflows/repo-quality.yaml/badge.svg,  it always shows this workflow run status> failed.