fix : README.md #909
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| build_and_deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Set up application.yml | |
| run: | | |
| echo "${{ secrets.APPLICATION}}" > src/main/resources/application.yml | |
| - name: Set up application-secret.yml | |
| run: | | |
| echo "${{ secrets.APPLICATION_SECRET}}" > src/main/resources/application-secret.yml | |
| - name: Set up application-File-MaxSize.yml | |
| run: | | |
| echo "${{ secrets.FILE_SIZE}}" >> src/main/resources/application-secret.yml | |
| - name: Set up application-Oauth.yml | |
| run: | | |
| echo "${{ secrets.OAUTHKEY}}" >> src/main/resources/application-secret.yml | |
| - name: Set up application-S3.yml | |
| run: | | |
| echo "${{ secrets.AWSS3}}" >> src/main/resources/application-secret.yml | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x ./gradlew | |
| - name: Cache Gradle packages | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle- | |
| - name: Build with Gradle | |
| run: ./gradlew build | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v2 | |
| - name: Login to Docker Hub | |
| run: echo "${{ secrets.DOCKERHUB_PW }}" | docker login -u "${{ secrets.DOCKERHUB_USERNAME }}" --password-stdin | |
| - name: Build and push Docker image with cache | |
| run: | | |
| docker build --build-arg JAR_FILE=build/libs/*.jar --build-arg PROFILES=blue --build-arg ENV=blue -t moaguide/moaguide:back_last . | |
| docker push moaguide/moaguide:back_last | |