Skip to content

Commit

Permalink
chore: add judger agent github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamerblue committed Apr 10, 2024
1 parent 856bb81 commit 1d0fd6e
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
36 changes: 36 additions & 0 deletions .github/workflows/judger-agent.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build Judger Agent Docker Image
on:
push:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-push:
runs-on: ubuntu-latest
defaults:
run:
working-directory: src/sub-app/judger-agent/
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Push Image
uses: docker/build-push-action@v3
with:
context: ./
file: ./Dockerfile
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/onlinejudge3-judger-agent:1
${{ secrets.DOCKERHUB_USERNAME }}/onlinejudge3-judger-agent:latest
1 change: 0 additions & 1 deletion src/sub-app/judger-agent/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ WORKDIR /app

COPY package.json ./
COPY package-lock.json ./
COPY .npmrc ./
COPY .node-version ./
COPY tsconfig.json ./
COPY ecosystem.config.js ./
Expand Down

0 comments on commit 1d0fd6e

Please sign in to comment.