Skip to content

Commit

Permalink
fix: 워크플로우 서브모듈 문제 해결 (#384)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoondgu authored Sep 6, 2023
1 parent 877dd06 commit 339b4ad
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 60 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/be-merge-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
submodules: recursive
token: ${{ secrets.SUBMODULE_ACCESS_TOKEN }}
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
submodules: recursive
token: ${{ secrets.SUBMODULE_ACCESS_TOKEN }}

- name: 테스트 환경변수 설정
run: |
Expand Down
49 changes: 25 additions & 24 deletions .github/workflows/be-merge-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,34 @@ jobs:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
submodules: recursive
token: ${{ secrets.SUBMODULE_ACCESS_TOKEN }}
- uses: actions/checkout@v3
with:
submodules: recursive
token: ${{ secrets.SUBMODULE_ACCESS_TOKEN }}
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: 테스트 환경변수 설정
run: |
echo "TEST_JWT_SECRET_KEY=${{ secrets.TEST_JWT_SECRET_KEY }}" >> $GITHUB_ENV
echo "TEST_JWT_EXPIRE_LENGTH=${{ secrets.TEST_JWT_EXPIRE_LENGTH }}" >> $GITHUB_ENV
- name: 테스트 환경변수 설정
run: |
echo "TEST_JWT_SECRET_KEY=${{ secrets.TEST_JWT_SECRET_KEY }}" >> $GITHUB_ENV
echo "TEST_JWT_EXPIRE_LENGTH=${{ secrets.TEST_JWT_EXPIRE_LENGTH }}" >> $GITHUB_ENV
- name: gradlew 실행 권한 부여
run: chmod +x gradlew
working-directory: backend

- name: gradlew 실행 권한 부여
run: chmod +x gradlew
working-directory: backend
- name: Gradle build 시작
run: ./gradlew clean build
working-directory: backend

- name: Gradle build 시작
run: ./gradlew clean build
working-directory: backend

- name: jar 파일 artifact에 업로드
uses: actions/upload-artifact@v3
with:
name: BackendApplication
path: backend/build/libs/mapbefine.jar
- name: jar 파일 artifact에 업로드
uses: actions/upload-artifact@v3
with:
name: BackendApplication
path: backend/build/libs/mapbefine.jar

deploy:
runs-on: [ self-hosted, prod ]
Expand Down
69 changes: 35 additions & 34 deletions .github/workflows/be-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,37 +18,38 @@ jobs:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
submodules: recursive
token: ${{ secrets.SUBMODULE_ACCESS_TOKEN }}

- name: 테스트 환경변수 설정
run: |
echo "TEST_JWT_SECRET_KEY=${{ secrets.TEST_JWT_SECRET_KEY }}" >> $GITHUB_ENV
echo "TEST_JWT_EXPIRE_LENGTH=${{ secrets.TEST_JWT_EXPIRE_LENGTH }}" >> $GITHUB_ENV
- name: gradlew 실행 권한 부여
run: chmod +x gradlew
working-directory: backend

- name: Gradle build 시작
run: ./gradlew clean build
working-directory: backend

- name: 테스트 결과를 PR에 코멘트로 등록합니다
uses: EnricoMi/publish-unit-test-result-action@v1
if: always()
with:
files: 'backend/build/test-results/test/TEST-*.xml'

- name: 테스트 실패 시, 실패한 코드 라인에 Check 코멘트를 등록합니다
uses: mikepenz/action-junit-report@v3
if: always()
with:
report_paths: '**/build/test-results/test/TEST-*.xml'
token: ${{ github.token }}
- uses: actions/checkout@v3
with:
submodules: recursive
token: ${{ secrets.SUBMODULE_ACCESS_TOKEN }}
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: 테스트 환경변수 설정
run: |
echo "TEST_JWT_SECRET_KEY=${{ secrets.TEST_JWT_SECRET_KEY }}" >> $GITHUB_ENV
echo "TEST_JWT_EXPIRE_LENGTH=${{ secrets.TEST_JWT_EXPIRE_LENGTH }}" >> $GITHUB_ENV
- name: gradlew 실행 권한 부여
run: chmod +x gradlew
working-directory: backend

- name: Gradle build 시작
run: ./gradlew clean build
working-directory: backend

- name: 테스트 결과를 PR에 코멘트로 등록합니다
uses: EnricoMi/publish-unit-test-result-action@v1
if: always()
with:
files: 'backend/build/test-results/test/TEST-*.xml'

- name: 테스트 실패 시, 실패한 코드 라인에 Check 코멘트를 등록합니다
uses: mikepenz/action-junit-report@v3
if: always()
with:
report_paths: '**/build/test-results/test/TEST-*.xml'
token: ${{ github.token }}

0 comments on commit 339b4ad

Please sign in to comment.