remove /api from controller #8
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
name: CI | |
on: | |
pull_request: | |
push: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@main | |
- name: Get repo name | |
id: get_repo | |
run: echo ::set-output name=REPO::${GITHUB_REPOSITORY#*/} | |
- name: Setup Java 17 | |
uses: actions/[email protected] | |
with: | |
distribution: 'adopt' | |
java-version: '17' | |
- name: Gradle Wrapper Validation | |
uses: gradle/[email protected] | |
- name: Gradle Setup | |
uses: gradle/[email protected] | |
with: | |
gradle-version: wrapper | |
- name: Gradle build | |
run: | | |
./gradlew build | |
mkdir data | |
cp ./build/libs/${GITHUB_REPOSITORY#*/}-*.jar ./data/app.jar | |
- name: Upload Build Artifact | |
uses: actions/[email protected] | |
with: | |
name: ${{steps.get_repo.outputs.REPO}} | |
path: ./data/app.jar | |
- name: Trigger CD | |
if: github.ref == 'refs/heads/main' | |
uses: peter-evans/repository-dispatch@v2 | |
with: | |
token: ${{ secrets.GITHUBACTION_TOKEN }} | |
repository: ${{ github.repository }} | |
event-type: trigger-cd |