From 4a1ad2b8cd27dbfa97d5b0fdd432c4e221fccbb5 Mon Sep 17 00:00:00 2001 From: Abhiraj Roy <157954129+iconized@users.noreply.github.com> Date: Wed, 29 May 2024 23:08:22 +0530 Subject: [PATCH] fix(workflow): redesigned action --- ...-commitizen-on-push.yml => commitizen.yml} | 5 +++- .../workflows/{main.yml => deployment.yml} | 4 ++- .../workflows/snigdhaos-commitzen-on-pull.yml | 30 ------------------- 3 files changed, 7 insertions(+), 32 deletions(-) rename .github/workflows/{snigdhaos-commitizen-on-push.yml => commitizen.yml} (91%) rename .github/workflows/{main.yml => deployment.yml} (97%) delete mode 100644 .github/workflows/snigdhaos-commitzen-on-pull.yml diff --git a/.github/workflows/snigdhaos-commitizen-on-push.yml b/.github/workflows/commitizen.yml similarity index 91% rename from .github/workflows/snigdhaos-commitizen-on-push.yml rename to .github/workflows/commitizen.yml index 5f3fa559..8286582b 100644 --- a/.github/workflows/snigdhaos-commitizen-on-push.yml +++ b/.github/workflows/commitizen.yml @@ -1,9 +1,12 @@ -name: Snigdha OS Commitizen Check on Push +name: Commitizen Check on: push: branches: - master + pull_request: + branches: + - master jobs: commitizen_check: diff --git a/.github/workflows/main.yml b/.github/workflows/deployment.yml similarity index 97% rename from .github/workflows/main.yml rename to .github/workflows/deployment.yml index 8868e4c3..d8e68419 100755 --- a/.github/workflows/main.yml +++ b/.github/workflows/deployment.yml @@ -1,10 +1,12 @@ # Sample workflow for building and deploying a Hugo site to GitHub Pages -name: Deploy snigdhaos web to page +name: Deploy Snigdha OS on: # Runs on pushes targeting the default branch push: branches: ["master"] + pull_request: + branches: ["master"] # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: diff --git a/.github/workflows/snigdhaos-commitzen-on-pull.yml b/.github/workflows/snigdhaos-commitzen-on-pull.yml deleted file mode 100644 index c80a671a..00000000 --- a/.github/workflows/snigdhaos-commitzen-on-pull.yml +++ /dev/null @@ -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 \ No newline at end of file