[Release] Release 3.30.29 #220
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: Publish to docker registry | |
on: | |
push: | |
branches: | |
- typescript | |
paths: | |
- 'package.json' | |
- 'src/**' | |
- 'docker/**' | |
- '.github/workflows/**' | |
jobs: | |
publish: | |
if: github.repository == 'CUP-ACM-Programming-Club/CUP-Online-Judge-Express' | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [12.x] | |
steps: | |
- uses: actions/checkout@v2 | |
name: Checkout code | |
with: | |
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token | |
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo | |
- name: Use Node.js environment | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Build env | |
run: | | |
echo "PKG_VERSION=$(node script/get_version.js)" >> $GITHUB_ENV | |
echo "BACKEND_ENV_VERSION=$(cat docker/base/VERSION)" >> $GITHUB_ENV | |
- uses: mr-smithers-excellent/docker-build-push@v2 | |
name: Build Backend service image | |
with: | |
image: ryanlee2014/cupoj-backend-env | |
tag: ${{ env.BACKEND_ENV_VERSION }} | |
registry: docker.io | |
dockerfile: ./docker/base/Dockerfile | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- uses: mr-smithers-excellent/docker-build-push@v2 | |
name: Build Backend service image | |
with: | |
image: ryanlee2014/cupoj-backend | |
tag: ${{ env.PKG_VERSION }} | |
registry: docker.io | |
dockerfile: ./docker/backend/Dockerfile | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- uses: mr-smithers-excellent/docker-build-push@v2 | |
name: Update Backend service image | |
with: | |
image: ryanlee2014/cupoj-backend | |
tag: latest | |
registry: docker.io | |
dockerfile: ./docker/backend/Dockerfile | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- uses: mr-smithers-excellent/docker-build-push@v2 | |
name: Build Websocket service image | |
with: | |
image: ryanlee2014/cupoj-websocket | |
tag: ${{ env.PKG_VERSION }} | |
registry: docker.io | |
dockerfile: ./docker/websocket/Dockerfile | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- uses: mr-smithers-excellent/docker-build-push@v2 | |
name: Update latest image | |
with: | |
image: ryanlee2014/cupoj-websocket | |
tag: latest | |
registry: docker.io | |
dockerfile: ./docker/websocket/Dockerfile | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} |