Skip to content

Commit 5cd6432

Browse files
authored
Merge pull request #16 from code0-tech/14-setup-pipeline
Setup pipeline
2 parents b75c2db + 998a0b6 commit 5cd6432

File tree

2 files changed

+79
-0
lines changed

2 files changed

+79
-0
lines changed

.github/workflows/ci.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
permissions:
10+
pull-requests: write
11+
12+
jobs:
13+
pipeline:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: Taucher2003/GitLab-Pipeline-Action@1.13.0
17+
name: Run pipeline
18+
id: pipeline
19+
with:
20+
GL_SERVER_URL: https://gitlab.com
21+
GL_PROJECT_ID: '75974852'
22+
GL_RUNNER_TOKEN: ${{ secrets.GL_RUNNER_TOKEN }}
23+
GL_API_TOKEN: ${{ secrets.GL_API_TOKEN }}
24+
SHOW_JOB_LOGS: all
25+
OVERRIDE_GITHUB_SHA: ${{ github.event_name == 'push' && github.sha || github.event.pull_request.head.sha }}
26+
OVERRIDE_GITHUB_REF_NAME: ${{ github.event_name == 'push' && github.ref_name || github.event.pull_request.head.ref }}
27+
env:
28+
GLPA_C0_GH_REF: ${{ github.ref }}
29+
GLPA_C0_GH_REF_NAME: ${{ github.ref_name }}
30+
31+
- name: Find existing comment
32+
uses: peter-evans/find-comment@v4
33+
id: find-comment
34+
if: ${{ !cancelled() && github.event_name == 'pull_request' }}
35+
with:
36+
issue-number: ${{ github.event.pull_request.number }}
37+
comment-author: 'github-actions[bot]'
38+
body-includes: <!-- glpa_comment:pipeline -->
39+
40+
- name: Create or update comment
41+
uses: peter-evans/create-or-update-comment@v5
42+
if: ${{ !cancelled() && github.event_name == 'pull_request' }}
43+
with:
44+
comment-id: ${{ steps.find-comment.outputs.comment-id }}
45+
issue-number: ${{ github.event.pull_request.number }}
46+
body: |
47+
<!-- glpa_comment:pipeline -->
48+
${{ steps.pipeline.outputs.SUMMARY_TEXT }}
49+
edit-mode: replace

.gitlab-ci.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
stages:
2+
- lint
3+
- build
4+
5+
.node:
6+
image: node:24.8.0
7+
before_script:
8+
- npm ci
9+
10+
lint:
11+
extends:
12+
- .node
13+
stage: lint
14+
script:
15+
- npm run lint
16+
17+
build:
18+
extends:
19+
- .node
20+
stage: build
21+
parallel:
22+
matrix:
23+
- EDITION:
24+
- ce
25+
- ee
26+
- cloud
27+
script:
28+
- '[[ $EDITION == "ce" ]] && rm -rf src/packages/{ee,cloud}'
29+
- '[[ $EDITION == "ee" ]] && rm -rf src/packages/cloud'
30+
- npm run build

0 commit comments

Comments
 (0)