Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Medea
Medea

Posted on

     

GitHub Actions with MongoDB

What I built

I have built an example of how you can connect MongoDB to GitHub Actions and use it as a reward system for a repo's contributors.

Category Submission:

This might be aDIY Deployments submission and the action runs on every push and helps figure out who the committer is.
If not, then it is aWacky Wildcards submission.

App Link

The demo of the template can be found onhttps://github-actions-mongodb.vercel.app

Screenshots

Action runs when the contributor's token count goes up by 1.
action runs

The dashboard where you can buy rewards with the tokens you earned when contributing.
dashboard

Description

This project includes a GitHub actions that runs on every push, gets the username of the user that has committed, and adds one token to their username profile in MongoDB.
It also comes with a dashboard, where the user can login with GitHub and spend their tokens on items.

Link to Source Code

GitHub Actions with MongoDB

Information

This website has been made for theGitHub + DEV Hackathon.

It is an example of how you can connect MongoDB to GitHub Actions and use it as a reward system for a repo's contributors.

Seeing the template in action

Contribute here to earn some tokens and see this template in action!

Using this template

To use this template you must generate:

  • A MongoDB URI
  • A url to deploy this website on
  • A secret for NextAuth
  • A GitHub OAuth App ID
  • A GitHub OAuth App Secret

To make the GitHub Action run, you will need to set theMONGODB_URI as a repository secret for the action.

When deploying this template as a website, you must have the environment variables:

  • MONGODB_URI
  • NEXAUTH_URL
  • NEXTAUTH_SECRET
  • GITHUB_ID
  • GITHUB_SECRET

Thanks for checking out this template! Make sure to star it and followVulcanWM for more content like this.




Permissive License

This project uses the license:Apache License 2.0

Background

I feel like a reward system always keeps me going and I wanted contributors to Open Source Communities to also feel the enthusiasm to keep them contributing.
I've always loved using MongoDB and I wanted to learn how to combine that with GitHub Actions.

How I built it

I used React and Next.js to create this website, and then I hosted it on Vercel.
I obviously used MongoDB as a database, as it is great for people who like using NoSQL databases.
I learnt how to create and use GitHub Actions, and I also learnt how to run specific files withnpm.

Additional Resources/Info

I would like to give special thanks to the GitHub documentation for providing a lot of information which helped me create the Action.

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

A 16 year old full-stack developer who codes for fun and loves building projects related to music
  • Location
    England
  • Pronouns
    she/her
  • Joined

More fromMedea

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp