Skip to content

Commit

Permalink
Merge pull request #141 from ConductionNL/feature/worfklows
Browse files Browse the repository at this point in the history
added workflows
  • Loading branch information
remko48 authored Nov 28, 2024
2 parents 26f60a0 + 79308e9 commit 9632fab
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/pull-request-from-branch-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Main Branch Protection

on:
pull_request:
branches:
- master

jobs:
check-branch:
runs-on: ubuntu-latest
steps:
- name: Check branch
run: |
if [[ ${GITHUB_HEAD_REF} != development ]] && [[ ${GITHUB_HEAD_REF} != documentation ]] && ! [[ ${GITHUB_HEAD_REF} =~ ^hotfix/ ]];
then
echo "Error: Pull request must come from 'development', 'documentation' or 'hotfix/' branch"
exit 1
fi
20 changes: 20 additions & 0 deletions .github/workflows/pull-request-lint-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Lint Check

on:
pull_request:
branches:
- never

jobs:
lint-check:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install dependencies
run: npm i

- name: Linting
run: npm run lint

0 comments on commit 9632fab

Please sign in to comment.