Skip to content

[IDLE-323] refactor: 애플 소셜로그인 리팩터링 #34

[IDLE-323] refactor: 애플 소셜로그인 리팩터링

[IDLE-323] refactor: 애플 소셜로그인 리팩터링 #34

name: 'user-service api specification to s3'
on:
pull_request:
branches:
- develop
paths:
- 'user-service/**'
- '.github/workflows/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Setup Application Yaml
uses: microsoft/variable-substitution@v1
with:
files: user-service/src/main/resources/application.yml
env:
spring.data.redis.host: ${{ secrets.DOCS_SERVER_US_REDIS_HOST }}
spring.security.oauth2.client.registration.google.client-id: ${{ secrets.GOOGLE_CLIENT_ID }}
spring.security.oauth2.client.registration.google.client-secret: ${{ secrets.GOOGLE_CLIENT_SECRET }}
spring.security.oauth2.client.registration.naver.client-id: ${{ secrets.NAVER_CLIENT_ID }}
spring.security.oauth2.client.registration.naver.client-secret: ${{ secrets.NAVER_CLIENT_SECRET }}
spring.security.oauth2.client.registration.kakao.client-id: ${{ secrets.KAKAO_CLIENT_ID }}
spring.security.oauth2.client.registration.kakao.client-secret: ${{ secrets.KAKAO_CLIENT_SECRET }}
spring.security.oauth2.client.registration.apple.client-id: ${{ secrets.APPLE_CLIENT_ID }}
spring.security.oauth2.client.registration.apple.client-secret: ${{ secrets.APPLE_CLIENT_SECRET }}
spring.cloud.aws.credentials.access-key: ${{ secrets.AWS_ACCESS_KEY }}
spring.cloud.aws.credentials.secret-key: ${{ secrets.AWS_SECRET_KEY }}
spring.cloud.openfeign.client.config.bookClient.url: ${{ secrets.BOOK_CLIENT_URL }}
jwt.secretKey: ${{ secrets.JWT_SECRET_KEY }}
spring.cloud.aws.sns.credentials.access-key: ${{ secrets.AWS_SNS_ACCESS_KEY }}
spring.cloud.aws.sns.credentials.secret-key: ${{ secrets.AWS_SNS_SECRET_KEY }}
spring.cloud.aws.sns.region.static: ${{ secrets.AWS_SNS_REGION }}
spring.cloud.aws.sns.topic.arn: ${{ secrets.AWS_SNS_TOPIC_ARN }}
- name: Setup Bootstrap Yaml
uses: microsoft/variable-substitution@v1
with:
files: user-service/src/main/resources/bootstrap.yml
env:
spring.profiles.active: test
- name: Create Output Directory
working-directory: user-service
run: |
mkdir -p build/resources/main/static/docs
echo "test" > build/resources/main/static/docs/user-service.json
- name: Set up Apple PrivateKey
working-directory: user-service
run: |
mkdir -p src/main/resources/apple
echo -e ${{ secrets.APPLE_AUTH_PRIVATE_KEY }} > src/main/resources/apple/AuthKey_8LCJC23RYD.p8
- name: Run Openapi3
working-directory: user-service
run: |
./gradlew openapi3
- name: Upload OpenApi Specification to S3
working-directory: user-service
run: |
aws s3 cp build/resources/main/static/docs/user-service.json s3://mybrary-swagger-ui/docs/user-service.json
env:
AWS_ACCESS_KEY_ID: ${{ secrets.OPEN_API_GIT_ACTIONS_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.OPEN_API_GIT_ACTIONS_SECRET_KEY }}
AWS_REGION: ap-northeast-2