7
7
8
8
jobs :
9
9
build :
10
+ timeout-minutes : 360
10
11
strategy :
11
12
fail-fast : false
12
13
matrix :
60
61
tags : ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }}
61
62
outputs : type=image,push-by-digest=true,name-canonical=true,push=true
62
63
64
+ - name : Test notebooks
65
+ shell : bash
66
+ run : |
67
+ docker run -t ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }}@${{ steps.build.outputs.digest }} bash -c " \
68
+ pip install pytest nbmake; \
69
+ find . -name '*.ipynb' | pytest --nbmake --nbmake-timeout=3600;"
70
+
63
71
- name : Export digest
64
72
run : |
65
73
mkdir -p ${{ runner.temp }}/digests
74
82
if-no-files-found : error
75
83
retention-days : 1
76
84
77
- merge :
85
+ tags :
86
+ if : github.event_name != 'pull_request'
78
87
runs-on : ubuntu-24.04
79
- name : merge into multiarch manifest
88
+ name : merge and tag
80
89
needs :
81
90
- build
82
91
steps :
@@ -104,7 +113,9 @@ jobs:
104
113
105
114
with :
106
115
images : ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }}
107
- tags : dev
116
+ tags : |
117
+ latest
118
+ ${{ needs.build.outputs.tag }}
108
119
109
120
- name : Create manifest list and push
110
121
id : annotate
@@ -128,53 +139,7 @@ jobs:
128
139
129
140
- name : Inspect image
130
141
run : |
131
- docker buildx imagetools inspect ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }}:dev
132
-
133
- tests :
134
- strategy :
135
- fail-fast : false
136
- matrix :
137
- platform :
138
- - linux/amd64
139
- - linux/arm64
140
- runs-on : ${{ matrix.platform == 'linux/amd64' && 'ubuntu-latest' || matrix.platform == 'linux/arm64' && 'ubuntu-24.04-arm' }}
141
- name : testing on ${{ matrix.platform }}
142
- timeout-minutes : 360
143
- needs :
144
- - build
145
- - merge
146
- steps :
147
-
148
- - name : Test notebooks
149
- shell : bash
150
- run : |
151
- docker run -t ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }}:dev bash -c " \
152
- pip install pytest nbmake; \
153
- find . -name '*.ipynb' | pytest --nbmake --nbmake-timeout=3600;"
154
-
155
- tags :
156
- runs-on : ubuntu-24.04
157
- if : github.event_name != 'pull_request'
158
- name : add tags
159
- needs :
160
- - build
161
- - tests
162
- steps :
163
- - name : Authenticate with GHCR
164
- id : auth
165
-
166
- with :
167
- registry : " ghcr.io"
168
- username : ${{github.actor}}
169
- password : ${{secrets.BUILD_TOKEN}}
170
-
171
- - name : tag release versions
172
- shell : bash
173
- run : |
174
- docker buildx imagetools create \
175
- --tag ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }}:latest \
176
- --tag ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }}:${{ needs.build.outputs.tag }} \
177
- ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }}:dev
142
+ docker buildx imagetools inspect ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }}:latest
178
143
179
144
- name : Post version update to dash
180
145
uses :
peter-evans/[email protected]
0 commit comments