-
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.
feat: add github action config files
- Loading branch information
1 parent
0bb332f
commit fdf46f3
Showing
2 changed files
with
110 additions
and
0 deletions.
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,66 @@ | ||
name: Build dispatcher module | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ master ] | ||
paths: [ .github/workflows/dispatcher.yml, dispatcher/** ] | ||
pull_request: | ||
branches: [ master ] | ||
paths: [ .github/workflows/dispatcher.yml, dispatcher/** ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
|
||
- name: Cache Maven dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven | ||
- name: Run compile | ||
run: mvn -f dispatcher/pom.xml clean compile --no-transfer-progress | ||
|
||
- name: Run tests | ||
run: mvn -f dispatcher/pom.xml clean test | ||
|
||
- name: Run Checkstyle | ||
run: mvn -f dispatcher/pom.xml checkstyle:check | ||
|
||
- name: Package the application | ||
run: mvn -f dispatcher/pom.xml package | ||
|
||
# deploy: | ||
# runs-on: ubuntu-latest | ||
# needs: build | ||
# | ||
# steps: | ||
# - name: Checkout repository | ||
# uses: actions/checkout@v3 | ||
# | ||
# - name: Set up SSH agent | ||
# uses: webfactory/ssh-agent@v0.8.1 | ||
# with: | ||
# ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
# | ||
# - name: Deploy and Run Docker Compose | ||
# run: | | ||
# ssh ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} << 'EOF' | ||
# cd /path/to/your/docker-compose/directory | ||
# docker-compose pull | ||
# docker-compose down | ||
# docker-compose up -d --build | ||
# EOF |
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,44 @@ | ||
name: Build node module | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ master ] | ||
paths: [ .github/workflows/node.yml, node/** ] | ||
pull_request: | ||
branches: [ master ] | ||
paths: [ .github/workflows/node.yml, node/** ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
|
||
- name: Cache Maven dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven | ||
- name: Run compile | ||
run: mvn -f node/pom.xml clean compile --no-transfer-progress | ||
|
||
- name: Run tests | ||
run: mvn -f node/pom.xml clean test | ||
|
||
- name: Run Checkstyle | ||
run: mvn -f node/pom.xml clean checkstyle:check | ||
|
||
- name: Package the application | ||
run: mvn -f node/pom.xml package |