-
Notifications
You must be signed in to change notification settings - Fork 32
82 lines (68 loc) · 2.18 KB
/
docker-publish.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
name: Publish docker image
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
release:
types: [published]
push:
branches:
- master # Push events on master branch
jobs:
deploy-judi-image:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version: ['1.10', '1.11']
steps:
- name: Check event name
run: echo ${{ github.event_name }}
- name: Checkout JUDI
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: JUDI development image
uses: docker/[email protected]
with:
context: .
file: ./docker/Dockerfile.JUDI
push: true
network: host
build-args: JVER=${{ matrix.version }}
tags: mloubout/judi:${{ matrix.version }}-dev
- name: JUDI release image
if: github.event_name == 'release'
uses: docker/[email protected]
with:
context: .
file: ./docker/Dockerfile.JUDI
push: true
network: host
build-args: JVER=${{ matrix.version }}
tags: |
mloubout/judi:${{ matrix.version }}-latest
mloubout/judi:${{ matrix.version }}-${{ github.event.release.tag_name }}
test-judi-image:
needs: deploy-judi-image
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version: ['1.10', '1.11']
steps:
- name: Run simple test
run: |
docker pull 'mloubout/judi:${{ matrix.version }}-dev'
docker run --rm --name testrun 'mloubout/judi:${{ matrix.version }}-dev' julia -e 'using Pkg;ENV["GROUP"]="BASICS";Pkg.test("JUDI")'
# NOTE: Suitable for the time being but will need to modify when we switch runners
- name: Clean
run: |
docker system prune -a -f