forked from karmada-io/dashboard
-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (54 loc) · 1.79 KB
/
ci.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Reference: https://github.com/karmada-io/karmada/blob/master/.github/workflows/ci.yml
# We cut some unused job to make the workflow more suitable for ci of karmada dashboard
name: CI Workflow
on:
# Run this workflow every time a new commit pushed to upstream/fork repository.
# Run workflow on fork repository will help contributors find and resolve issues before sending a PR.
push:
# Exclude branches created by Dependabot to avoid triggering current workflow
# for PRs initiated by Dependabot.
branches-ignore:
- 'dependabot/**'
pull_request:
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
concurrency:
group: ${{ github.workflow }}-${{ github.actor }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read # for actions/checkout to fetch code
jobs:
build-frontend:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
- uses: pnpm/action-setup@v4
with:
version: 8.15.6
- name: Build dashboard
run: |
echo "Start build"
pnpm --version
cd ui
pnpm install --filter @karmada/dashboard
pnpm run dashboard:build
build-bin:
name: build-bin
runs-on: ubuntu-22.04
steps:
- name: checkout code
uses: actions/checkout@v4
with:
# Number of commits to fetch. 0 indicates all history for all branches and tags.
# We need to guess version via git tags.
fetch-depth: 0
- name: install Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: compile
run: make all