[IDLE-248] github actions workflow 수정 #58
Workflow file for this run
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: 'user-service api specification to s3' | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- 'backend/user-service/**' | |
pull_request: | |
branches: | |
- master | |
paths: | |
- 'backend/user-service/**' | |
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: backend/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.cloud.aws.credentials.access-key: ${{ secrets.AWS_ACCESS_KEY }} | |
spring.cloud.aws.credentials.secret-key: ${{ secrets.AWS_SECRET_KEY }} | |
jwt.secretKey: ${{ secrets.JWT_SECRET_KEY }} | |
- name: Setup Bootstrap Yaml | |
uses: microsoft/variable-substitution@v1 | |
with: | |
files: backend/user-service/src/main/resources/bootstrap.yml | |
env: | |
spring.profiles.active: test | |
- name: Create Output Directory | |
working-directory: backend/user-service | |
run: | | |
mkdir -p build/resources/main/static/docs | |
echo "test" > build/resources/main/static/docs/user-service.json | |
- name: Run Openapi3 | |
working-directory: backend/user-service | |
run: | | |
./gradlew openapi3 | |
- name: Upload OpenApi Specification to S3 | |
working-directory: backend/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 |