Skip to content

Commit

Permalink
[CHORE] CI Pipeline 구축 (#7)
Browse files Browse the repository at this point in the history
* CHORE: Create ohhanahana-ci.yml

* fix: submodule token 추가

* fix: token명 변경

* FIX: token 필드명 수정

* FIX: gradlew 권한 부여

* REFACTFIX: rvice-key ì 서브모듈 적용

* FIX: Spring-profile-active 필드 추가

* FIX: 오류 - 제거

* Update ohhanahana-ci.yml

* Update ohhanahana-ci.yml

* Update ohhanahana-ci.yml

* Update ohhanahana-ci.yml

* Update ohhanahana-ci.yml

* Update ohhanahana-ci.yml

* f

* fix: update

* remove application.yml
  • Loading branch information
junseokkim authored Jun 6, 2024
1 parent 6c0567d commit aec418b
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 2 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/ohhanahana-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle

name: Ohhanahana CI Pipeline

on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]

jobs:
build:

runs-on: ubuntu-latest

steps:

- name: checkout
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

- name: checkout submodule
uses: actions/checkout@v4
with:
submodules: true
token: ${{ secrets.ACTIONS_TOKEN }}

- name: Update submodule
run: |
git submodule update --remote --recursive
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew

- name: Build with Gradle
run: ./gradlew clean build -x test
env:
SPRING_PROFILES_ACTIVE: main

2 changes: 1 addition & 1 deletion config
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import jakarta.xml.bind.JAXBException;
import jakarta.xml.bind.Unmarshaller;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.client.ClientHttpRequestFactory;
import org.springframework.http.client.SimpleClientHttpRequestFactory;
import org.springframework.http.converter.StringHttpMessageConverter;
Expand All @@ -27,7 +28,9 @@
public class BusService {

private final String baseUri = "http://apis.data.go.kr/6280000/busArrivalService/getAllRouteBusArrivalList?serviceKey=";
private final String serviceKey = "";

@Value("${api.bus-information.service-key}")
private String serviceKey;

public RecommendResponse getBusArrivalData() throws JAXBException {
List<BusStop> busStops = Arrays.stream(BusStop.values()).toList();
Expand Down

0 comments on commit aec418b

Please sign in to comment.