π Hi Everyone,
We are TeamTigers, a group of undergrad students studying Bachelor of Science in Software Engineering. And here is our submission for #ActionsHackathon.
Our Workflow
Minisauras is an open-source CI/CD automation tool based on GitHub Actions that pulls all the desired JavaScript and CSS files from your base branch, minify them and creates a pull-request with a new branch.
How it works
- Traverse through a given directory (if not provided, traverse from root), finds all the JavaScript & CSS files within it and it's sub-directories.
- Afterwards, Minisauras minify all those files.
- Finally, it creates a new branch in your repository, push those changes and creates a pull request that can be merged in your base branch.
Submission Category:
We are submitting this action in following categories:
π DIY Deployments (Primary)
π Wacky Wildcards (Secondary)
Yaml File or Link to Code
Users' Guideline
- Create a personal access token.
- Then setup a secret using that personal access token in your desired repository.
- Create a workflow. For example: main.yml under (.github/workflows) directory.
- In the workflow, provide following things:
- Personal access token. For example: secrets.TOKEN if you set your secret with a name 'TOKEN'.
- The desired directory in which you want to minify CSS and JS files. For example:
'./'
for root and'src/'
for src directory.
- name: minisauras
uses: TeamTigers/minisauras@v2.0.0
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
with:
directory: 'src/' # all files under 'src' directory
Minisauras Repository :
TeamTigers / minisauras
An open-source CI/CD automation tool based on :octocat: GitHub Actions that pulls all the JavaScript and CSS files from your base branch, minify them and creates a pull-request with a new branch.
Minisauras π
Minisauras is an open-source CI/CD automation tool based on GitHub Actions that pulls all the JavaScript and CSS files from your base branch, minify them and creates a pull-request with a new branch.
How it works
- Traverse through a given directory (if not provided, traverse from root), finds all the JavaScript & CSS files within it and it's sub-directories.
- Afterwards, Minisauras minify all those files.
- Finally, it creates a new branch in your repository, push those changes and creates a pull request that can be merged in your base branch.
Usage
- Create a personal access token.
- Then setup a secret using that personal access token in your desired repository.
- Create a workflow. For example: main.yml under (.github/workflows) directory.
- In the workflow, provide following things
- Personal access token. For example: ${{ secrets.TOKEN }} if you set your secret with a name 'TOKEN'.
- The desired directory in which youβ¦
Additional Resources / Info
π‘ Example and output
Here is an example repository that shows the usage of GitHub Action minisauras. You can see there, how minisauras has minified all the CSS & JS files of this repository and sent a Pull Request over there.
TeamTigers / minisauras-example
An example repository to show how to use @TeamTigers/minisauras in a repository.
Below is a pull request sent by Minisauras with changes in some CSS and JavaScript files:
Additionally, in the GitHub Action's console you will see the confirmation of pull request sent by Minisauras.
Our journey π€
It was a fun participating in GitHub Actions Hackathon. Usually in academic projects we develop Web or Mobile applications. We've participated in so many national & international Hackathons too. But in #ActionsHackathon we did something really new !!! We've faced so many challenges during the development period. Below is our 'Action Development Life Cycle' (ADLC). Obviously, this journey isn't over yet. We'll still be maintaining this project after the hackathon. So, you can submit issues for improvements and new feature requests at anytime.
Here are some really good resources that helped us building Minisauras:
- Creating a JavaScript Action
- Octokit REST API Documentation
- Octokit plugin to create a pull request
- Promise in JavaScript
Top comments (21)
This is awesome π
Thanks a lot @Prafulla. We're glad you liked it. Best of luck. π π
Best of luck π
Nice Idea π³
Thank you so much π
Wow nice good job creating this.
Thank you so much. We're glad you loved it π
Wow π
Thank you so much π
I like it.
We're glad you liked. We would like to hear more about your experience of using Minisauras.
great brothers !! keep it up :)
Thank you so much. You can check our source code too π.
This is great.
Glad you liked π π
Cool idea! Keep it up π§π©
Glad you liked it. You may check our source code here. We would love to hear more from you. π
Awesome
Thank you so much, Maulik π. You may check our source code here. We would love to hear more from you.
Nice Job my big brothers. Another winning project.β€
Thanks for you great compliment, Raton π