-
Notifications
You must be signed in to change notification settings - Fork 6
48 lines (45 loc) · 1.72 KB
/
build_judge_env.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Build judge environment
on:
push:
branches:
- master
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
name: Checkout code
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: Build env
run: |
echo "PKG_VERSION=$(cat docker/judger-env/VERSION)" >> $GITHUB_ENV
echo "PKG_FULL_VERSION=$(cat docker/judger-env/VERSION)-full" >> $GITHUB_ENV
- uses: mr-smithers-excellent/docker-build-push@v2
name: Build judger environment image
with:
image: ryanlee2014/cupoj-judger-env
tag: ${{ env.PKG_VERSION }}
registry: docker.io
dockerfile: ./docker/judger-env/base/Dockerfile
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: mr-smithers-excellent/docker-build-push@v2
name: Update judger environment image
with:
image: ryanlee2014/cupoj-judger-env
tag: latest
registry: docker.io
dockerfile: ./docker/judger-env/base/Dockerfile
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: mr-smithers-excellent/docker-build-push@v2
name: Build judger environment image
with:
image: ryanlee2014/cupoj-judger-env
tag: ${{ env.PKG_FULL_VERSION }}
registry: docker.io
dockerfile: ./docker/judger-env/full/Dockerfile
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}