|
1 | | -name: "Build judge image" |
2 | | -on: |
3 | | - schedule: |
4 | | - - cron: "0 12 * * 1" |
5 | | - push: |
6 | | - branches: [main] |
7 | | - paths: |
8 | | - - judge |
9 | | - - .github/workflows/judge.yml |
10 | | - workflow_dispatch: |
11 | | -jobs: |
12 | | - build-and-push: |
13 | | - name: Build and push to ghcr.io |
14 | | - runs-on: ubuntu-24.04-arm |
15 | | - permissions: |
16 | | - contents: read |
17 | | - packages: write |
18 | | - attestations: write |
19 | | - id-token: write |
20 | | - steps: |
21 | | - - name: Checkout |
22 | | - uses: actions/checkout@v5 |
23 | | - - name: Log in to the Container registry |
24 | | - uses: docker/login-action@v3 |
25 | | - with: |
26 | | - registry: ghcr.io |
27 | | - username: ${{ github.actor }} |
28 | | - password: ${{ secrets.GITHUB_TOKEN }} |
29 | | - - name: Docker metadata |
30 | | - id: meta |
31 | | - uses: docker/metadata-action@v5 |
32 | | - images: ghcr.io/AlgoMasterLLC/judge-server |
33 | | - - name: Setup QEMU |
34 | | - uses: docker/setup-qemu-action@v2 |
35 | | - - name: Setup Docker BuildX |
36 | | - uses: docker/setup-buildx-action@v2 |
37 | | - - name: Login to DockerHub |
38 | | - if: github.event_name != 'pull_request' |
39 | | - uses: docker/login-action@v2 |
40 | | - with: |
41 | | - username: ${{ secrets.DOCKERHUB_USERNAME }} |
42 | | - password: ${{ secrets.DOCKERHUB_TOKEN }} |
43 | | - - name: Push to DockerHub |
44 | | - uses: docker/build-push-action@v4 |
45 | | - with: |
46 | | - platforms: linux/amd64 |
47 | | - cache-from: type=gha |
48 | | - cache-to: type=gha,mode=max |
49 | | - context: . |
50 | | - push: ${{ github.event_name != 'pull_request' }} |
51 | | - tags: ${{ steps.meta.outputs.tags }} |
52 | | - labels: ${{ steps.meta.outputs.labels }} |
0 commit comments