diff --git a/.github/workflows/commitizen.yml b/.github/workflows/commitizen.yml new file mode 100644 index 0000000..ac93cb1 --- /dev/null +++ b/.github/workflows/commitizen.yml @@ -0,0 +1,33 @@ +name: Commitizen Check on Push and Pull + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + commitizen_check: + name: Check Commitizen Commit on Push + 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 \ No newline at end of file diff --git a/push.sh b/push.sh index c079b0b..c3cb084 100755 --- a/push.sh +++ b/push.sh @@ -1,27 +1,35 @@ #!/bin/bash -# Author : Eshan Roy -# Author URI : https://eshanized.github.io/ +# Author : Eshanized +# Author URI : https://tonmoyinfrastructure.github.io/eshanized/ -# NOTE: REPO = Your Repository Name On the Host -# NOTE: ORG = Your ORGANIZATION NAME or USERNAME -# NOTE: HOST = GitHub, Gitlab, Bitbucket etc. +################################ NOTE ################################ +#!!!!!!!!!!!!! Exexcute all the scripts at your own risk !!!!!!!!!!!!! +# I have written the push script for Arch Linux and other Arch Based # +# Linux Distribution. So this script will only work in ArchLinux and # +# Arch based Linux Distribution. You may customize it according to # +# your Distribution. # +###################################################################### -# Repo Config -REPO=snigdhaos-backgrounds -# Host Config -HOST=https://github.com -# Destination Config -ORG=Snigdha-OS +# ---> First We will check for commitizen is installed or not +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 +} -# Set the repository URL and branch -REPO_URL="${HOST}/${ORG}/${REPO}.git" -BRANCH="master" # or "main" depending on your repository's default branch +# Function to stage, commit, and push changes +push_to_github() { + git add . + git cz + git push origin master +} -# Commit message -MESSAGE="@eshanized: push via script" +# Main Function +main() { + check_commitizen + push_to_github +} -# Add all files, commit, and push changes -git add . -git commit -m "$MESSAGE" -git push origin $BRANCH \ No newline at end of file +main \ No newline at end of file diff --git a/src/snigdhaos-backgrounds/snigdhaos-background-19.jpg b/src/snigdhaos-backgrounds/snigdhaos-background-19.jpg new file mode 100644 index 0000000..7f15618 Binary files /dev/null and b/src/snigdhaos-backgrounds/snigdhaos-background-19.jpg differ