refactor: yml file 변경 #1
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: Backend Production Server CD All | |
permissions: | |
contents: read | |
on: | |
push: | |
branches: [ "be/my-test" ] | |
tags: | |
- 'v*' | |
jobs: | |
test: | |
uses: ./.github/workflows/Backend-CI.yml | |
secrets: inherit | |
build: | |
needs: test | |
runs-on: ci | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.ACTION_TOKEN }} | |
submodules: true | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Build with Gradle | |
run: ./gradlew bootJar | |
working-directory: ./backend/pokerogue | |
- name: Docker build and push | |
run: | | |
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} | |
docker build -t ${{ secrets.DOCKER_SERVER_IMAGE }} -f ./backend/pokerogue/docker/Dockerfile ./backend/pokerogue | |
docker push ${{ secrets.DOCKER_SERVER_IMAGE }} | |
prod_a: | |
needs: build | |
name: Backend Production Server CD A | |
uses: ./.github/workflows/Backend-CD-Prod-A.yml | |
secrets: inherit |