Feat/ticket: 수험번호 및 수험표 발급 기능 구현 #702
Workflow file for this run
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: Docker CI/CD | |
| on: | |
| pull_request: | |
| branches: [ develop,prod ] | |
| push: | |
| branches: [ develop, prod ] | |
| workflow_dispatch: | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@v3 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| - name: Cache Gradle files | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
| restore-keys: | | |
| gradle-${{ runner.os }}- | |
| - name: Clone external repo with jar into libs/ | |
| run: | | |
| mkdir -p libs | |
| git clone https://x-access-token:${{ secrets.GH_PAT }}@github.com/mosu-dev/mosu-kmc-jar.git temp-jar | |
| cp temp-jar/*.jar libs/ | |
| - name: Build with Gradle | |
| run: ./gradlew build -x test | |
| - name: Log in to DockerHub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Build Docker image | |
| run: docker build -t kangtaehyun1107/mosu-server:${{ github.sha }} . | |
| working-directory: | |
| - name: Push Docker image | |
| run: docker push kangtaehyun1107/mosu-server:${{ github.sha }} |