-
Notifications
You must be signed in to change notification settings - Fork 1
33 lines (29 loc) · 894 Bytes
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: CI Pipeline
on:
pull_request:
types: [opened, synchronize]
branches: [master, staging, dev]
jobs:
frontend:
uses: ./.github/workflows/frontend.yml
with:
node-version: ${{ vars.NODE_VERSION }}
npm-version: ${{ vars.NPM_VERSION }}
php-version: ${{ vars.PHP_VERSION }}
backend:
uses: ./.github/workflows/backendTests.yml
with:
node-version: ${{ vars.NODE_VERSION }}
npm-version: ${{ vars.NPM_VERSION }}
php-version: ${{ vars.PHP_VERSION }}
auto-merge:
needs: [frontend, backend]
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
- name: Merge pull request
run: |
gh pr merge --merge "${{ github.event.pull_request.number }}"
env:
GH_TOKEN: ${{ secrets.GH_PAT }}