attempt 1 #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |