In some of the previous posts, I wrote about how to Send Drone CI build notifications with Slack.
Here’s some quick steps on how to add the Drone CI build status to your favorite project on GitHub.
Prerequisites
- Drone CI
Solution
Step 1. From your Drone CI, click on any repository you want to add the build status, and scroll to the bottom of the page under Settings.
Step 2. Copy the URL under Badges.
Note(s): You could also choose the badge format including Markdown, Markup, or CCMenu, and the Git branch as well.
Step 3. Now, paste the URL on top of the Git repo README.md file, usually above the first header. Commit and push your changes.
Step 4. Once the git push command triggers a webhook to Drone CI, and the build completes, regardless of the build status, head over to your GitHub repository page and notice your README.md file.
You should get something like:
or, if build fails:
Conclusion
And that’s it! Don’t forget to have fun debugging builds along the way. Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.