Skip to content

Modify/#398 infra zero down time (#422) #9

Modify/#398 infra zero down time (#422)

Modify/#398 infra zero down time (#422) #9

name: Backend Production Server CD All
permissions:
contents: read
on:
push:
branches: [ "be/release-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
prod_b:
needs: prod_a
name: Backend Production Server CD B
uses: ./.github/workflows/Backend-CD-Prod-B.yml
secrets: inherit