Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change to GitHub workflow badge routes #8671

Comments

@chris48s
Copy link
Member

chris48s commented Dec 1, 2022

🥱 TL;DR

If you have a github workflow .github/workflows/test.yml

name: Run Tests
...

You need to update your badge URL from

https://img.shields.io/github/workflow/status/<user>/<repo>/Run%20Tests
to
https://img.shields.io/github/actions/workflow/status/<user>/<repo>/test.yml?branch=main

  • The key change here is that the workflow parameter is now the workflow filename, not the name: defined in yaml
  • We also recommend specifying the branch param in most cases, although it is not required.

If a branch param is not supplied the badge will look first for builds on your default branch and then fall back to the latest build on any branch or ref if none are found on the default branch. This is mainly useful for "branchless" worfklows (like workflows that runs against a tags or release).

If your workflow is in a subdirectory under .github/workflows, include the subdir in the route.

https://img.shields.io/github/actions/workflow/status/<user>/<repo>/sub_directory/test.yml?branch=main

Note that the workflow filename/path is case sensitive.

❓ Why are we making this change?

This change resolves the problem reported in #8146 Some users were reporting that our badges were reporting incorrect or unexpected values in some situations.

After consulting with GitHub support, it transpired that identifying workflows using the name in the yaml file can be ambiguous in some situations and defaults to finding workflows on any branch when a branch param is not specified, rather than the default branch. Switching to identifying workflows by the workflow filename and making branch a required parameter resolves these problems. Two workflows can have the same name string in yaml, but filename is unique on a given branch. GitHub themselves have quietly switched their own native badges to using this method.

We decided that dropping the old badges (using the workflow name) and requiring users to switch to the new URLs (rather than keeping the old ones "working") was the right choice for our users because in some cases the old badges were serving data which was inaccurate or unexpected in subtle ways. Serving accurate data is the most important thing for us to prioritise.

😭 You made a breaking change! Waa

We know. We try never to do this and it is not a decision we took lightly, especially given this is one of our highest traffic badges. In general, our philosophy is: If you embedded a shields badge in your README in 2013 and the upstream service is still online, that badge should still work today. We achieve this with almost no exceptions.

Occasionally we do need to change badge routes for various reasons, but usually we keep old URLs working using redirects. In this case, it was not possible to provide a transition because the new badge route uses a different parameter.

One of the reasons we try to never do this is because we don't really have a great way to communicate a breaking change to our users or provide warning before it happens. We have no idea who uses our service. We don't ask anyone to sign up, we don't track you. Hopefully given that constraint we have done a reasonable job of this.

📚 Further Reading

@chris48s chris48s changed the title Placeholder issue Change to GitHub workflow badge routes Dec 15, 2022
@chris48s chris48s pinned this issue Dec 15, 2022
kevinoid added a commit to kevinoid/python-project-template that referenced this issue Dec 15, 2022
kevinoid added a commit to kevinoid/node-project-template that referenced this issue Dec 15, 2022
kevinoid added a commit to kevinoid/node-project-template that referenced this issue Dec 15, 2022
igorpecovnik added a commit to armbian/build that referenced this issue Dec 15, 2022
igorpecovnik added a commit to armbian/build that referenced this issue Dec 15, 2022
igorpecovnik added a commit to armbian/build that referenced this issue Dec 15, 2022
dangowans added a commit to cityssm/lot-occupancy-system that referenced this issue Dec 15, 2022
josiah-wolf-oberholtzer added a commit to supriya-project/uqbar that referenced this issue Dec 15, 2022
josiah-wolf-oberholtzer added a commit to supriya-project/supriya that referenced this issue Dec 15, 2022
stephane-caron added a commit to qpsolvers/qpsolvers that referenced this issue Dec 15, 2022
EgorBron added a commit to Blusutils/DESrv that referenced this issue Dec 15, 2022
stephane-caron added a commit to stephane-caron/pink that referenced this issue Dec 15, 2022
AlbertUnruh added a commit to Alberto-X3/Alberto-X3-V3 that referenced this issue Dec 15, 2022
markus-k added a commit to markus-k/adventofcode that referenced this issue Dec 15, 2022
SaifAqqad added a commit to SaifAqqad/AHK_MicMute that referenced this issue Dec 15, 2022
make-github-pseudonymous-again pushed a commit to comparison-sorting/partition that referenced this issue Mar 3, 2024
These changes were automatically generated by a transform whose code can be found at:
  - https://github.com/make-github-pseudonymous-again/rejuvenate/blob/b27ce6d333a4c46ff5161eaddfbe16895bbabf0f/src/transforms/readme:tests-badge-shields-issue-8671.js
Please contact the author of the transform if you believe there was an error.
make-github-pseudonymous-again pushed a commit to comparison-sorting/specification that referenced this issue Mar 3, 2024
These changes were automatically generated by a transform whose code can be found at:
  - https://github.com/make-github-pseudonymous-again/rejuvenate/blob/b27ce6d333a4c46ff5161eaddfbe16895bbabf0f/src/transforms/readme:tests-badge-shields-issue-8671.js
Please contact the author of the transform if you believe there was an error.
make-github-pseudonymous-again pushed a commit to codec-bytes/error that referenced this issue Mar 3, 2024
These changes were automatically generated by a transform whose code can be found at:
  - https://github.com/make-github-pseudonymous-again/rejuvenate/blob/b27ce6d333a4c46ff5161eaddfbe16895bbabf0f/src/transforms/readme:tests-badge-shields-issue-8671.js
Please contact the author of the transform if you believe there was an error.
make-github-pseudonymous-again pushed a commit to codec-bytes/ascii that referenced this issue Mar 3, 2024
These changes were automatically generated by a transform whose code can be found at:
  - https://github.com/make-github-pseudonymous-again/rejuvenate/blob/b27ce6d333a4c46ff5161eaddfbe16895bbabf0f/src/transforms/readme:tests-badge-shields-issue-8671.js
Please contact the author of the transform if you believe there was an error.
make-github-pseudonymous-again pushed a commit to codec-bytes/base64 that referenced this issue Mar 3, 2024
These changes were automatically generated by a transform whose code can be found at:
  - https://github.com/make-github-pseudonymous-again/rejuvenate/blob/b27ce6d333a4c46ff5161eaddfbe16895bbabf0f/src/transforms/readme:tests-badge-shields-issue-8671.js
Please contact the author of the transform if you believe there was an error.
make-github-pseudonymous-again pushed a commit to codec-bytes/base32 that referenced this issue Mar 3, 2024
These changes were automatically generated by a transform whose code can be found at:
  - https://github.com/make-github-pseudonymous-again/rejuvenate/blob/b27ce6d333a4c46ff5161eaddfbe16895bbabf0f/src/transforms/readme:tests-badge-shields-issue-8671.js
Please contact the author of the transform if you believe there was an error.
make-github-pseudonymous-again pushed a commit to codec-bytes/base16 that referenced this issue Mar 3, 2024
These changes were automatically generated by a transform whose code can be found at:
  - https://github.com/make-github-pseudonymous-again/rejuvenate/blob/b27ce6d333a4c46ff5161eaddfbe16895bbabf0f/src/transforms/readme:tests-badge-shields-issue-8671.js
Please contact the author of the transform if you believe there was an error.
make-github-pseudonymous-again pushed a commit to trie-data-structure/uncompressed-trie that referenced this issue Mar 3, 2024
These changes were automatically generated by a transform whose code can be found at:
  - https://github.com/make-github-pseudonymous-again/rejuvenate/blob/b27ce6d333a4c46ff5161eaddfbe16895bbabf0f/src/transforms/readme:tests-badge-shields-issue-8671.js
Please contact the author of the transform if you believe there was an error.
make-github-pseudonymous-again pushed a commit to compression-algorithm/lempel-ziv that referenced this issue Mar 3, 2024
These changes were automatically generated by a transform whose code can be found at:
  - https://github.com/make-github-pseudonymous-again/rejuvenate/blob/b27ce6d333a4c46ff5161eaddfbe16895bbabf0f/src/transforms/readme:tests-badge-shields-issue-8671.js
Please contact the author of the transform if you believe there was an error.
make-github-pseudonymous-again pushed a commit to randomized-algorithm/random that referenced this issue Mar 3, 2024
These changes were automatically generated by a transform whose code can be found at:
  - https://github.com/make-github-pseudonymous-again/rejuvenate/blob/b27ce6d333a4c46ff5161eaddfbe16895bbabf0f/src/transforms/readme:tests-badge-shields-issue-8671.js
Please contact the author of the transform if you believe there was an error.
make-github-pseudonymous-again pushed a commit to number-theoretic/integers that referenced this issue Mar 3, 2024
These changes were automatically generated by a transform whose code can be found at:
  - https://github.com/make-github-pseudonymous-again/rejuvenate/blob/b27ce6d333a4c46ff5161eaddfbe16895bbabf0f/src/transforms/readme:tests-badge-shields-issue-8671.js
Please contact the author of the transform if you believe there was an error.
make-github-pseudonymous-again pushed a commit to number-theoretic/primes that referenced this issue Mar 3, 2024
These changes were automatically generated by a transform whose code can be found at:
  - https://github.com/make-github-pseudonymous-again/rejuvenate/blob/b27ce6d333a4c46ff5161eaddfbe16895bbabf0f/src/transforms/readme:tests-badge-shields-issue-8671.js
Please contact the author of the transform if you believe there was an error.
make-github-pseudonymous-again pushed a commit to computational-problem-solving/knapsack that referenced this issue Mar 3, 2024
These changes were automatically generated by a transform whose code can be found at:
  - https://github.com/make-github-pseudonymous-again/rejuvenate/blob/b27ce6d333a4c46ff5161eaddfbe16895bbabf0f/src/transforms/readme:tests-badge-shields-issue-8671.js
Please contact the author of the transform if you believe there was an error.
make-github-pseudonymous-again pushed a commit to data-structure-algebra/doubly-linked-list that referenced this issue Mar 3, 2024
These changes were automatically generated by a transform whose code can be found at:
  - https://github.com/make-github-pseudonymous-again/rejuvenate/blob/b27ce6d333a4c46ff5161eaddfbe16895bbabf0f/src/transforms/readme:tests-badge-shields-issue-8671.js
Please contact the author of the transform if you believe there was an error.
make-github-pseudonymous-again pushed a commit to data-structures-and-algorithms/deque that referenced this issue Mar 7, 2024
These changes were automatically generated by a transform whose code can be found at:
  - https://github.com/make-github-pseudonymous-again/rejuvenate/blob/31b7e48f29789fa2e2ad9e16013ff277c3bbca57/src/transforms/readme:tests-badge-shields-issue-8671.js
Please contact the author of the transform if you believe there was an error.
make-github-pseudonymous-again pushed a commit to data-structures-and-algorithms/heapq that referenced this issue Mar 7, 2024
These changes were automatically generated by a transform whose code can be found at:
  - https://github.com/make-github-pseudonymous-again/rejuvenate/blob/31b7e48f29789fa2e2ad9e16013ff277c3bbca57/src/transforms/readme:tests-badge-shields-issue-8671.js
Please contact the author of the transform if you believe there was an error.
make-github-pseudonymous-again pushed a commit to iterable-iterator/next that referenced this issue Mar 7, 2024
These changes were automatically generated by a transform whose code can be found at:
  - https://github.com/make-github-pseudonymous-again/rejuvenate/blob/31b7e48f29789fa2e2ad9e16013ff277c3bbca57/src/transforms/readme:tests-badge-shields-issue-8671.js
Please contact the author of the transform if you believe there was an error.
make-github-pseudonymous-again pushed a commit to collection-abstraction/counter that referenced this issue Mar 7, 2024
These changes were automatically generated by a transform whose code can be found at:
  - https://github.com/make-github-pseudonymous-again/rejuvenate/blob/31b7e48f29789fa2e2ad9e16013ff277c3bbca57/src/transforms/readme:tests-badge-shields-issue-8671.js
Please contact the author of the transform if you believe there was an error.
make-github-pseudonymous-again pushed a commit to collection-abstraction/pairs that referenced this issue Mar 7, 2024
These changes were automatically generated by a transform whose code can be found at:
  - https://github.com/make-github-pseudonymous-again/rejuvenate/blob/31b7e48f29789fa2e2ad9e16013ff277c3bbca57/src/transforms/readme:tests-badge-shields-issue-8671.js
Please contact the author of the transform if you believe there was an error.
make-github-pseudonymous-again pushed a commit to collection-abstraction/dict that referenced this issue Mar 7, 2024
These changes were automatically generated by a transform whose code can be found at:
  - https://github.com/make-github-pseudonymous-again/rejuvenate/blob/31b7e48f29789fa2e2ad9e16013ff277c3bbca57/src/transforms/readme:tests-badge-shields-issue-8671.js
Please contact the author of the transform if you believe there was an error.
make-github-pseudonymous-again pushed a commit to computational-combinatorics/factorial that referenced this issue Mar 8, 2024
These changes were automatically generated by a transform whose code can be found at:
  - https://github.com/make-github-pseudonymous-again/rejuvenate/blob/31b7e48f29789fa2e2ad9e16013ff277c3bbca57/src/transforms/readme:tests-badge-shields-issue-8671.js
Please contact the author of the transform if you believe there was an error.
make-github-pseudonymous-again pushed a commit to heap-data-structure/fibonacci-heap that referenced this issue Mar 9, 2024
These changes were automatically generated by a transform whose code can be found at:
  - https://github.com/make-github-pseudonymous-again/rejuvenate/blob/b27ce6d333a4c46ff5161eaddfbe16895bbabf0f/src/transforms/readme:tests-badge-shields-issue-8671.js
Please contact the author of the transform if you believe there was an error.
make-github-pseudonymous-again pushed a commit to iterable-iterator/cycle that referenced this issue Mar 9, 2024
These changes were automatically generated by a transform whose code can be found at:
  - https://github.com/make-github-pseudonymous-again/rejuvenate/blob/b27ce6d333a4c46ff5161eaddfbe16895bbabf0f/src/transforms/readme:tests-badge-shields-issue-8671.js
Please contact the author of the transform if you believe there was an error.
make-github-pseudonymous-again pushed a commit to iterable-iterator/cycle that referenced this issue Mar 9, 2024
These changes were automatically generated by a transform whose code can be found at:
  - https://github.com/make-github-pseudonymous-again/rejuvenate/blob/b27ce6d333a4c46ff5161eaddfbe16895bbabf0f/src/transforms/readme:tests-badge-shields-issue-8671.js
Please contact the author of the transform if you believe there was an error.
make-github-pseudonymous-again pushed a commit to computational-problem-solving/sat that referenced this issue Mar 9, 2024
These changes were automatically generated by a transform whose code can be found at:
  - https://github.com/make-github-pseudonymous-again/rejuvenate/blob/b27ce6d333a4c46ff5161eaddfbe16895bbabf0f/src/transforms/readme:tests-badge-shields-issue-8671.js
Please contact the author of the transform if you believe there was an error.
make-github-pseudonymous-again pushed a commit to iterable-iterator/select that referenced this issue Mar 9, 2024
These changes were automatically generated by a transform whose code can be found at:
  - https://github.com/make-github-pseudonymous-again/rejuvenate/blob/226d4e7e3007eec8c87131eba27d9316968deec6/src/transforms/readme:tests-badge-shields-issue-8671.js
Please contact the author of the transform if you believe there was an error.
make-github-pseudonymous-again pushed a commit to integer-sorting/radix-sort that referenced this issue Mar 11, 2024
These changes were automatically generated by a transform whose code can be found at:
  - https://github.com/make-github-pseudonymous-again/rejuvenate/blob/aa845ce62d5726e14a9c13613ccabe0978b29940/src/transforms/readme:tests-badge-shields-issue-8671.js
Please contact the author of the transform if you believe there was an error.
chkpnt added a commit to chkpnt/chkpnt-mailserver that referenced this issue Apr 21, 2024
phanirithvij added a commit to phanirithvij/npins that referenced this issue Jun 8, 2024
andir pushed a commit to andir/npins that referenced this issue Jun 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.