mirror of
https://github.com/Snigdha-OS/Snigdha-OS.github.io.git
synced 2025-09-07 13:15:17 +02:00
@@ -1,9 +1,12 @@
|
|||||||
name: Snigdha OS Commitizen Check on Push
|
name: Commitizen Check
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
commitizen_check:
|
commitizen_check:
|
@@ -1,10 +1,12 @@
|
|||||||
# Sample workflow for building and deploying a Hugo site to GitHub Pages
|
# Sample workflow for building and deploying a Hugo site to GitHub Pages
|
||||||
name: Deploy snigdhaos web to page
|
name: Deploy Snigdha OS
|
||||||
|
|
||||||
on:
|
on:
|
||||||
# Runs on pushes targeting the default branch
|
# Runs on pushes targeting the default branch
|
||||||
push:
|
push:
|
||||||
branches: ["master"]
|
branches: ["master"]
|
||||||
|
pull_request:
|
||||||
|
branches: ["master"]
|
||||||
|
|
||||||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
||||||
permissions:
|
permissions:
|
@@ -1,30 +0,0 @@
|
|||||||
name: Snigdha OS Commitizen Check On Pull
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
commitizen_check:
|
|
||||||
name: Check Commitizen Commit on Pull Request
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout Repository
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Install Node.js
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: '14'
|
|
||||||
|
|
||||||
- name: Install Commitizen
|
|
||||||
run: npm install -g commitizen
|
|
||||||
|
|
||||||
- name: Verify Commitizen Commit
|
|
||||||
run: |
|
|
||||||
if git log --format='%s' ${{ github.event.before }}..${{ github.sha }} | grep -v '^(feat|fix|docs|style|refactor|perf|test|chore)(\(.+\))?: .+'; then
|
|
||||||
echo "Invalid commit message found. Please use Commitizen convention."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
36
iconized.sh
36
iconized.sh
@@ -1,36 +0,0 @@
|
|||||||
<<<<<<< HEAD
|
|
||||||
#!/bin/bash
|
|
||||||
=======
|
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Author : Eshan Roy
|
|
||||||
# URI : https://eshanized.github.io
|
|
||||||
|
|
||||||
# NOTE: If you are on Snigdha OS,
|
|
||||||
# you can install commitizen-go with `sudo pacman -S commitizen-go`
|
|
||||||
# or `s commitizen-go`. Else you need to install `yay` or `yay-bin`
|
|
||||||
# to install commitizen. I have written this script only for *Arch Linux.
|
|
||||||
|
|
||||||
# Function to check if Commitizen is installed
|
|
||||||
check_commitizen() {
|
|
||||||
if ! pacman -Qq commitizen-go &> /dev/null; then
|
|
||||||
echo "Commitizen is not installed. Please install it using 'yay -S commitizen-go'." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Function to stage, commit, and push changes
|
|
||||||
push_to_github() {
|
|
||||||
git add .
|
|
||||||
git cz
|
|
||||||
git push origin master
|
|
||||||
}
|
|
||||||
|
|
||||||
# Main Function
|
|
||||||
main() {
|
|
||||||
check_commitizen
|
|
||||||
push_to_github
|
|
||||||
}
|
|
||||||
|
|
||||||
main
|
|
||||||
>>>>>>> 122db96bc4e6a7242cb3d37c53eef560cb6aba8f
|
|
Reference in New Issue
Block a user