-
Notifications
You must be signed in to change notification settings - Fork 15
90 lines (90 loc) · 4 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: Build Docker Images
on:
push:
pull_request:
schedule:
- cron: '0 0 * * 1'
jobs:
amd64:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- uses: actions/checkout@v3
- 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 dmoj/runtimes-tier1:amd64-latest
docker push dmoj/runtimes-tier2:amd64-latest
docker push dmoj/runtimes-tier3: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
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
- name: Push images to GitHub Containers
if: (github.event_name == 'push' || github.event_name == 'schedule') && github.ref == 'refs/heads/master'
run: |
echo "$GITHUB_TOKEN" | docker login ghcr.io -u $ --password-stdin
docker push ghcr.io/dmoj/runtimes-tier1:amd64-latest
docker push ghcr.io/dmoj/runtimes-tier2:amd64-latest
docker push ghcr.io/dmoj/runtimes-tier3:amd64-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
arm64:
runs-on: [self-hosted, Linux, ARM64]
permissions:
packages: write
steps:
- uses: actions/checkout@v3
- name: Build tier 1 Docker image
run: make TAG=aarch64-latest image-tier1
- name: Test tier 1 Docker image
run: make TAG=aarch64-latest test-tier1
- name: Build tier 2 Docker image
run: make TAG=aarch64-latest image-tier2
- name: Test tier 2 Docker image
run: make TAG=aarch64-latest test-tier2
- name: Build tier 3 Docker image
run: make TAG=aarch64-latest image-tier3
- name: Test tier 3 Docker image
run: make TAG=aarch64-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 dmoj/runtimes-tier1:aarch64-latest
docker push dmoj/runtimes-tier2:aarch64-latest
docker push dmoj/runtimes-tier3:aarch64-latest
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
- name: Push images to GitHub Containers
if: (github.event_name == 'push' || github.event_name == 'schedule') && github.ref == 'refs/heads/master'
run: |
echo "$GITHUB_TOKEN" | docker login ghcr.io -u $ --password-stdin
docker push ghcr.io/dmoj/runtimes-tier1:aarch64-latest
docker push ghcr.io/dmoj/runtimes-tier2:aarch64-latest
docker push ghcr.io/dmoj/runtimes-tier3:aarch64-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}