forked from DMOJ/runtimes-docker
-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (50 loc) · 2.2 KB
/
docker.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
49
50
name: Build Docker Images
on:
push:
pull_request:
schedule:
- cron: '0 0 * * 1'
jobs:
amd64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build tier icpc Docker image
run: make TAG=amd64-latest image-tiericpc
- name: Test tier icpc Docker image
run: make TAG=amd64-latest test-tiericpc
- name: Build tier 1 Docker image
run: make TAG=amd64-latest image-tier1
- name: Test tier 1 Docker image
run: make TAG=amd64-latest test-tier1
- name: Build tier 2 Docker image
run: make TAG=amd64-latest image-tier2
- name: Test tier 2 Docker image
run: make TAG=amd64-latest test-tier2
- name: Build tier 3 Docker image
run: make TAG=amd64-latest image-tier3
- name: Test tier 3 Docker image
run: make TAG=amd64-latest test-tier3
- name: Push images to Docker
if: (github.event_name == 'push' || github.event_name == 'schedule') && github.ref == 'refs/heads/master'
run: |
echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
docker push vnoj/runtimes-tier1:amd64-latest
docker push vnoj/runtimes-tier2:amd64-latest
docker push vnoj/runtimes-tier3:amd64-latest
docker push vnoj/runtimes-tiericpc:amd64-latest
docker run -v "$(pwd)":/code mplatform/manifest-tool \
--username="$DOCKER_USERNAME" --password="$DOCKER_PASSWORD" \
push from-spec /code/tier1/manifest.yml
docker run -v "$(pwd)":/code mplatform/manifest-tool \
--username="$DOCKER_USERNAME" --password="$DOCKER_PASSWORD" \
push from-spec /code/tier2/manifest.yml
docker run -v "$(pwd)":/code mplatform/manifest-tool \
--username="$DOCKER_USERNAME" --password="$DOCKER_PASSWORD" \
push from-spec /code/tier3/manifest.yml
docker run -v "$(pwd)":/code mplatform/manifest-tool \
--username="$DOCKER_USERNAME" --password="$DOCKER_PASSWORD" \
push from-spec /code/tiericpc/manifest.yml
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}