Skip to content

Commit

Permalink
BI-29 : Add Status Check in CI/CD pipeline (#10)
Browse files Browse the repository at this point in the history
* BI:29 Added job in workflow to check upto date PR

* configured prettierignore file

* BI:29 updated reference of Check for Divergence job

* BI:29 updated logic of comparison to compare common base

* BI-29: New logic for job updated

* BI-29: New logic for job

* BI-29: New logic for job

* BI-29: small fix for commit fe63695

* BI-29: small fix for commit 8479d38

* BI-29: New logic added for the workflow

* BI-29: Changed the log message
  • Loading branch information
ayushtiwari110 authored Oct 16, 2023
1 parent e8176f6 commit 3d94089
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,21 @@ jobs:
with:
# 👇 Chromatic projectToken, refer to the manage page to obtain it.
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}

check-up-to-date:
name: Check if PR is up to date with the main branch
runs-on: ubuntu-latest

steps:
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
#Check if the PR is up to date with the main branch
- name: Check if branch is ahead of main
run: |
if ! git merge-base --is-ancestor origin/main ${{ github.event.pull_request.head.sha }};
then echo "This branch is not up to date. Please merge with main.";
exit 1;
else echo "This branch is up to date with main!🎉";
fi
Empty file removed .preetierignore
Empty file.
9 changes: 9 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.github/workflows/actions.yml
.eslintrc.json
.prettierrc.json
.storybook/
.vscode/settings.json
package.json
package-lock.json
README.md
tailwind.config.js

0 comments on commit 3d94089

Please sign in to comment.