Skip to content

feat: upgrade the underlying framework #139

feat: upgrade the underlying framework

feat: upgrade the underlying framework #139

Workflow file for this run

name: Build and push Docker images
on:
push:
branches:
- master
workflow_dispatch: # add manual trigger button
jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Run Gradle
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./gradlew build --scan
- name: To disable the cache of sduoj-server packages
run: rm -rfv ~/.gradle/caches/modules*/**/com.sduoj*/**
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
registry: registry.cn-beijing.aliyuncs.com
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: registry.cn-beijing.aliyuncs.com/pre-sduoj/sduoj-judger:latest
cache-from: type=gha
cache-to: type=gha,mode=max