From 5f0a27538c884b7e219e4ad42727b9bc4f2f7e60 Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Tue, 14 Nov 2023 16:52:10 +0530 Subject: [PATCH] Added: github workflow templates --- .github/ISSUE_TEMPLATE/BUG_REPORT.md | 31 ++++++++++++++++ .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md | 23 ++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 17 +++++++++ .github/workflows/firebase-hosting-merge.yml | 16 +++++++++ .../workflows/firebase-hosting-release.yml | 16 +++++++++ .github/workflows/pull-request.yml | 35 +++++-------------- 6 files changed, 112 insertions(+), 26 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/BUG_REPORT.md create mode 100644 .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/workflows/firebase-hosting-merge.yml create mode 100644 .github/workflows/firebase-hosting-release.yml diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.md b/.github/ISSUE_TEMPLATE/BUG_REPORT.md new file mode 100644 index 00000000..2c541a84 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.md @@ -0,0 +1,31 @@ +--- +name: Bug report +about: Create a report to help us improve +labels: bug +--- + +## Current behavior + + + +## Expected behavior + + + +## Steps to reproduce the issue + + + +## Can you handle fixing this bug by yourself? + +- [ ] YES +- [ ] NO + +## Environment details + +- Browser: +- OS: +- Code Version: + +## Additional information + diff --git a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md new file mode 100644 index 00000000..561fd3d1 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md @@ -0,0 +1,23 @@ +--- +name: Feature request +about: Suggest an idea for this project +labels: feature request + +--- + +## What is the motivation for adding/enhancing this feature? + + + +## What are the acceptance criteria? + + +- [ ] ... + +## Can you complete this feature request by yourself? + +- [ ] YES +- [ ] NO + +## Additional information + diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..4fa3800f --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,17 @@ +### Related Issues + + +Closes # + +### Short Description and Why It's Useful + + + +### Screenshots of Visual Changes before/after (If There Are Any) + + + +### Contribution and Currently Important Rules Acceptance + + +- [ ] I read and followed [contribution rules](https://github.com/hotwax/facilities#contribution-guideline) \ No newline at end of file diff --git a/.github/workflows/firebase-hosting-merge.yml b/.github/workflows/firebase-hosting-merge.yml new file mode 100644 index 00000000..6cf9fc9e --- /dev/null +++ b/.github/workflows/firebase-hosting-merge.yml @@ -0,0 +1,16 @@ +# This file was auto-generated by the Firebase CLI +# https://github.com/firebase/firebase-tools + +name: Deploy to Firebase Hosting on merge +'on': + push: + branches: + - main +jobs: + call-workflow-in-another-repo: + uses: hotwax/dxp-components/.github/workflows/common-firebase-hosting-merge.yml@main + with: + config-path: .github/labeler.yml + secrets: + envPAT: ${{ secrets.envPAT }} + HOTWAX_PUBLIC_SECRET: ${{ secrets.HOTWAX_PUBLIC_SECRET }} \ No newline at end of file diff --git a/.github/workflows/firebase-hosting-release.yml b/.github/workflows/firebase-hosting-release.yml new file mode 100644 index 00000000..95f9c36e --- /dev/null +++ b/.github/workflows/firebase-hosting-release.yml @@ -0,0 +1,16 @@ +# This file was auto-generated by the Firebase CLI +# https://github.com/firebase/firebase-tools + +name: Deploy to Firebase Hosting on release +'on': + push: + tags: + - '*' # Push events to every tag not containing / Refer https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#patterns-to-match-branches-and-tags +jobs: + call-workflow-in-another-repo: + uses: hotwax/dxp-components/.github/workflows/common-firebase-hosting-release.yml@main + with: + config-path: .github/labeler.yml + secrets: + envPAT: ${{ secrets.envPAT }} + HOTWAX_PUBLIC_SECRET: ${{ secrets.HOTWAX_PUBLIC_SECRET }} \ No newline at end of file diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index e6bacfd9..0dc36964 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -2,32 +2,15 @@ name: Verify build on: push: - branches: [ main ] + branches: [main] pull_request: # The branches below must be a subset of the branches above - branches: [ main ] - + branches: [main] -jobs: - build: - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [12.x, 14.x, 16.x] - - steps: - - uses: actions/checkout@v2 - - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - - - name: Install Dependencies - run: npm install - - name: Generate .env file - run: cp .env.example .env - - name: Build - run: npm run build \ No newline at end of file +jobs: + call-workflow-in-another-repo: + uses: hotwax/dxp-components/.github/workflows/common-pull-request.yml@main + with: + config-path: .github/labeler.yml + secrets: + envPAT: ${{ secrets.envPAT }}