Skip to content

build: update lockfile #512

build: update lockfile

build: update lockfile #512

Workflow file for this run

name: Docker
on:
push:
branches: ["master"]
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
ALI_REGISTRY: registry.cn-hangzhou.aliyuncs.com
TENCENT_REGISTRY: hkccr.ccs.tencentyun.com
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.ALI_REGISTRY }}
username: stagoh
password: ${{ secrets.ALIYUN_DOCKER }}
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
username: stagoh
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"
- name: Install dependencies & Build Hydro
run: |
yarn install
yarn build:ui:production
- name: Extract metadata (tags, labels) for Backend Image
id: b_meta
uses: docker/metadata-action@v5
with:
images: ${{ env.ALI_REGISTRY }}/jgsu-acm/backend, stagoh/jgsuoj-backend
tags: latest
- name: Extract metadata (tags, labels) for Judge Image
id: j_meta
uses: docker/metadata-action@v5
with:
images: ${{ env.ALI_REGISTRY }}/jgsu-acm/judge, stagoh/jgsuoj-judge
tags: latest
- name: Build and push Docker image Backend
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.b_meta.outputs.tags }}
labels: ${{ steps.b_meta.outputs.labels }}
file: docker/backend/Dockerfile
cache-from: type=gha, scope=${{ github.workflow }}
cache-to: type=gha, scope=${{ github.workflow }}
- name: Build and push Docker image Judge
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.j_meta.outputs.tags }}
labels: ${{ steps.j_meta.outputs.labels }}
file: docker/judge/Dockerfile
cache-from: type=gha, scope=${{ github.workflow }}
cache-to: type=gha, scope=${{ github.workflow }}