Automating My GitHub Profile with DevOps: A Journey

Automating My GitHub Profile with DevOps: A Journey

With the power of modern DevOps practices, I embarked on a journey to automate the creation of my GitHub "About Me" section. By harnessing the capabilities of a quick Node.js script and a GitHub Action, I successfully extracted information from various online sources to generate a Markdown file in just about an hour and a half.

My inspiration sprang from a Meetup event organized by Dot Net North on the topic of automating tasks with GitHub. The event featured a talk by Simon Jackson, which emphasized leveraging GitHub Actions beyond development, even to trigger consumer IoT devices. This talk made me reconsider the non-development applications of GitHub Actions.

As I found myself repeatedly updating values within my GitHub profile's 'About Me' repository, prompted by my recent volunteering at beer festivals, I questioned the need for duplicating these updates. After all, I already maintain my Polywork profile collection with the same information.

This self-inquiry led me to identify three values that could be automated and incorporated into a markdown file: the count of hackathons I've participated in, the number of beers I've checked in on Untappd, and the tally of beer festivals I've volunteered at. While the Untappd API served as the data source for one value, the other two required me to utilize the Cheerio Node.js package for web scraping.

Creating a JavaScript script for this purpose was relatively straightforward. Defining the correct query selectors for Polywork's collections proved to be a minor task, and integrating with an API was particularly seamless, thanks to the request Node.js example code provided by Postman.

After extracting these values and consolidating them within a local markdown file, my focus shifted to implementing the GitHub Action workflow. Fortunately, I had prior experience in creating a GitHub Action script to detect repository updates, execute custom JavaScript scripts, and transfer resulting files between repositories. While the initial use case was for generating anonymized data for the Manchester Tech Meetup Data repository, I adapted and modified this script to suit my current goal: updating my GitHub profile's 'About Me' repository.

To delve deeper into my coding journey, you can explore the commits of the generation repository, the successful GitHub Action Run, and the corresponding commit in my GitHub profile's 'About Me' repository.

FIND ME ON

EMAIL ME ON

EMAIL US ON