-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (46 loc) · 1.72 KB
/
build.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 and Publish to Docker Hub
on:
push:
branches:
- master
jobs:
build-and-deploy-esy:
runs-on: ubuntu-latest
strategy:
matrix:
ESY_VERSION: ["0.6.7", "0.6.10"]
steps:
- uses: actions/checkout@v2
- name: Build esy image
run: |
docker login --username ${{ secrets.DOCKER_USERNAME }} --password ${{ secrets.DOCKER_PASSWORD }}
docker build --rm -f "Dockerfile.esy" --build-arg ESY_VERSION=esy@${{ matrix.ESY_VERSION }} -t reasonnative/esy:${{ matrix.ESY_VERSION }} "."
docker push reasonnative/esy:${{ matrix.ESY_VERSION }}
docker logout
build-and-deploy-esy-nightly:
runs-on: ubuntu-latest
strategy:
matrix:
ESY_VERSION: ["nightly"]
steps:
- uses: actions/checkout@v2
- name: Build esy image
run: |
docker login --username ${{ secrets.DOCKER_USERNAME }} --password ${{ secrets.DOCKER_PASSWORD }}
docker build --rm -f "Dockerfile.esy" --build-arg ESY_VERSION=@esy-nightly/[email protected] -t reasonnative/esy:${{ matrix.ESY_VERSION }} "."
docker push reasonnative/esy:${{ matrix.ESY_VERSION }}
docker logout
build-and-deploy:
needs: [build-and-deploy-esy, build-and-deploy-esy-nightly]
runs-on: ubuntu-latest
strategy:
matrix:
OCAML_VERSION: ["4.9.0", "4.9.1", "4.10.1", "4.12.0"]
ESY_VERSION: ["0.6.10", "0.6.7", "nightly"]
steps:
- uses: actions/checkout@v2
- name: Build esy image
run: |
docker login --username ${{ secrets.DOCKER_USERNAME }} --password ${{ secrets.DOCKER_PASSWORD }}
./build-and-push.sh ${{ matrix.OCAML_VERSION }} ${{ matrix.ESY_VERSION }}
docker logout