This is a small, relatively useless web application that demonstrates a few basic concepts in order to showcase parts of my skillset. It communicates with GitHub over HTTP. The application's main goal is to convert the SSH public keys of a specified user on GitHub into another machine-readable format, specifically JSON.
We are using GitHub's https://github.com/bkenez.keys endpoint as our source
The web application consists of a single endpoint located at /github_keys/<username>. This endpoint is designed to retrieve the SSH keys for the specified GitHub user <username> and return a list of keys in the form of a JSON object.
The application accepts GET requests to the /github_keys/<username> endpoint.
Suppose we make a GET request to the endpoint /github_keys/USERNAME. The response would be as follows:
[
{
"type": "ssh-rsa",
"key": "long string representing a public key"
},
{
"type": "ssh-rsa",
"key": "long string representing a public key"
}
]To build an image for the web application, a Dockerfile is provided. The Dockerfile contains the necessary instructions to create the image.
A GitHub Actions pipeline has been created to automate the build and push process of the application image to the GitHub Actions registry. The suggested pipeline consists of the following stages: test/lint, build image, and push image. However, alternative pipeline configurations can be used as long as the ultimate goal of having the image in the registry is achieved.
If a requested user does not exist, the appropriate HTTP response code to be returned is 404 Not Found.