forked from karmada-io/dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: setup ci-workflow for PR (karmada-io#115)
* ci: add all target in Makefile Signed-off-by: warjiang <1096409085@qq.com> * ci: add ci-workflow actions Co-authored-by: Hongcai Ren <renhongcai@huawei.com> Signed-off-by: warjiang <1096409085@qq.com> --------- Signed-off-by: warjiang <1096409085@qq.com> Co-authored-by: Hongcai Ren <renhongcai@huawei.com>
- Loading branch information
1 parent
9113d27
commit 491bd8f
Showing
2 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 -w | ||
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 |
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