Skip to content

Commit

Permalink
chore: update workflows config (#96)
Browse files Browse the repository at this point in the history
### What this PR does?
使用 [reusable workflows](https://github.com/halo-sigs/reusable-workflows) 替换原本的配置

```release-note
None
```
  • Loading branch information
guqing committed May 4, 2024
1 parent dfcca1b commit 5b24556
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 130 deletions.
127 changes: 0 additions & 127 deletions .github/workflows/build.yml

This file was deleted.

18 changes: 18 additions & 0 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: CD

on:
release:
types:
- published

jobs:
cd:
uses: halo-sigs/reusable-workflows/.github/workflows/plugin-cd.yaml@v1
secrets:
halo-username: ${{ secrets.HALO_USERNAME }}
halo-password: ${{ secrets.HALO_PASSWORD }}
permissions:
contents: write
with:
app-id: app-SnwWD
ui-path: "console"
15 changes: 15 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
ci:
uses: halo-sigs/reusable-workflows/.github/workflows/plugin-ci.yaml@v1
with:
ui-path: "console"
12 changes: 9 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,19 @@ node {
nodeProjectDir = file("${project.projectDir}/console")
}

task buildFrontend(type: PnpmTask) {
tasks.register('installDepsForUI', PnpmTask) {
args = ['install']
}

tasks.register('buildFrontend', PnpmTask) {
args = ['build']
dependsOn('installDepsForUI')
}

build {
// build frontend before build
tasks.getByName('compileJava').dependsOn('buildFrontend')
tasks.named('compileJava').configure {
dependsOn('buildFrontend')
}
}

halo {
Expand Down

0 comments on commit 5b24556

Please sign in to comment.