diff --git a/.github/workflows/judger-agent.yml b/.github/workflows/judger-agent.yml new file mode 100644 index 0000000..f127c60 --- /dev/null +++ b/.github/workflows/judger-agent.yml @@ -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 diff --git a/src/sub-app/judger-agent/Dockerfile b/src/sub-app/judger-agent/Dockerfile index 265df68..d3f6a5a 100644 --- a/src/sub-app/judger-agent/Dockerfile +++ b/src/sub-app/judger-agent/Dockerfile @@ -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 ./