-
Notifications
You must be signed in to change notification settings - Fork 9
96 lines (76 loc) · 3.03 KB
/
Copy pathdocker-image-build.yml
File metadata and controls
96 lines (76 loc) · 3.03 KB
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
91
92
93
94
name: Docker Images CI
on:
pull_request:
branches: [ master ]
pull_request_target:
branches: [ master ]
push:
branches: [ master ]
workflow_dispatch:
jobs:
build-dev:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build DEV Docker image
run: |
docker build ./src/dev \
--tag nest/nest-simulator:latest \
--tag nest/nest-simulator:dev
- name: Check NEST dev
run: |
docker run --rm nest/nest-simulator:latest python3 -c "import nest" | grep "Version:"
- name: Login to Docker Hub
if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/master' }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Push DEV to Docker Hub
if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/master' }}
run: |
docker push nest/nest-simulator:latest
docker push nest/nest-simulator:dev
build-2-20-2:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build 2.20.2 Docker image
run: |
docker build ./src/2.20.2 --tag nest/nest-simulator:2.20.2
- name: Check NEST 2.20.2
run: |
docker run --rm nest/nest-simulator:2.20.2 python3 -c "import nest" | grep "Version:"
- name: Login to Docker Hub
if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/master' }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Push 2.20.2 to Docker Hub
if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/master' }}
run: |
docker push nest/nest-simulator:2.20.2
build-3-9:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build 3.9 Docker image
run: |
docker build ./src/3.9 --tag nest/nest-simulator:3.9
- name: Check NEST 3.9
run: |
docker run --rm nest/nest-simulator:3.9 python3 -c "import nest" | grep "Version:"
- name: Login to Docker Hub
if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/master' }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Push 3.9 to Docker Hub
if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/master' }}
run: |
docker push nest/nest-simulator:3.9