Skip to content

[Chore] modify gradle.yml #5

[Chore] modify gradle.yml

[Chore] modify gradle.yml #5

Workflow file for this run

# 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: Java CI with Gradle
on:
push:
branches: [ "dev" ]
pull_request:
branches: [ "dev" ]
env:
S3_BUCKET_NAME: s3-ttubeog
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Copy secret
env:
OCCUPY_SECRET: ${{ secrets.OCCUPY_SECRET }}
OCCUPY_DB_SECRET: ${{ secrets.OCCUPY_DB_SECRET }}
OCCUPY_OAUTH_SECRET: ${{ secrets.OCCUPY_OAUTH_SECRET }}
OCCUPY_SWAGGER_SECRET: ${{ secrets.OCCUPY_SWAGGER_SECRET }}
OCCUPY_SECRET_DIR: src/main/resources
OCCUPY_DB_SECRET_DIR: $OCCUPY_SECRET_DIR/database
OCCUPY_OAUTH_SECRET_DIR: $OCCUPY_SECRET_DIR/oauth2
OCCUPY_SWAGGER_SECRET_DIR: $OCCUPY_SECRET_DIR/swagger
OCCUPY_SECRET_DIR_FILE_NAME: application.yml
OCCUPY_DB_SECRET_DIR_FILE_NAME: application-database.yml
OCCUPY_OAUTH_SECRET_DIR_FILE_NAME: application-oauth2.yml
OCCUPY_swagger_SECRET_DIR_FILE_NAME: application-springdoc.yml
run: echo $OCCUPY_SECRET | base64 --decode > $OCCUPY_SECRET_DIR/$OCCUPY_SECRET_DIR_FILE_NAME &&
echo $OCCUPY_DB_SECRET | base64 --decode > $OCCUPY_DB_SECRET_DIR/$OCCUPY_DB_SECRET_DIR_FILE_NAME &&
echo $OCCUPY_OAUTH_SECRET | base64 --decode > $OCCUPY_OAUTH_SECRET_DIR/$OCCUPY_OAUTH_SECRET_DIR_FILE_NAME &&
echo $OCCUPY_SWAGGER_SECRET | base64 --decode > $OCCUPY_SWAGGER_SECRET_DIR/$OCCUPY_SWAGGER_SECRET_DIR_FILE_NAME
- name: Run chmod to make gradlew executable
run: chmod +x ./gradlew
- name: Build with Gradle
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0
with:
arguments: build