63
63
fail-fast : false
64
64
matrix :
65
65
os :
66
- - macos-latest
66
+ - macos-13
67
67
- ubuntu-latest
68
68
python-version : ["3.8", "3.9", "3.10", "3.11"]
69
69
runs-on : ${{ matrix.os }}
@@ -201,13 +201,14 @@ jobs:
201
201
# Gather and prepare the dynamic version and other vars for use with work below.
202
202
# For example, 1.1.0.post6.dev0+bc093ef becomes 1.1.0.post6.dev0_bc093ef
203
203
- name : Gather dynamic version and set env var
204
+ if : (github.event_name == 'push'|| github.event_name == 'schedule') && github.ref == 'refs/heads/main'
204
205
id : env-vars
205
206
run : >-
206
- echo "CLEAN_VERSION=$(echo ${{ env.sdist_filename }} | tr '+' '_' )" >> "$GITHUB_OUTPUT" &&
207
+ echo "CLEAN_VERSION=$(echo ${{ env.sdist_extracted_name }} | tr '+' '_' )" >> "$GITHUB_OUTPUT" &&
207
208
echo "DATE_TAG=$(date +'%y%m%d')" >> "$GITHUB_OUTPUT"
208
209
- name : Login to Docker Hub
209
210
# only run this task if we have a pull request merged or the schedule triggers from main
210
- if : (github.event.pull_request.merged || github.event_name == 'schedule') && github.ref == 'refs/heads/main'
211
+ if : (github.event_name == 'push' || github.event_name == 'schedule') && github.ref == 'refs/heads/main'
211
212
uses : docker/login-action@v3
212
213
with :
213
214
username : ${{ secrets.DOCKER_USER }}
@@ -220,26 +221,27 @@ jobs:
220
221
with :
221
222
context : " ${{ env.sdist_extracted_name }}"
222
223
push : true
223
- file : .. /build/docker/Dockerfile
224
+ file : ./build/docker/Dockerfile
224
225
target : production
225
226
tags : cytomining/pycytominer:${{ steps.env-vars.outputs.CLEAN_VERSION }}_${{ steps.env-vars.outputs.DATE_TAG }}
226
227
# Docker image push based on GitHub pushes to main
227
228
- name : Push-based docker image push
228
229
# only run this task if we have a pull request which is merged
229
- if : github.event.pull_request.merged && github.ref == 'refs/heads/main' && github.repository == 'cytomining/pycytominer'
230
+ if : github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'cytomining/pycytominer'
230
231
uses : docker/build-push-action@v5
231
232
with :
232
233
context : " ${{ env.sdist_extracted_name }}"
233
234
push : true
234
- file : .. /build/docker/Dockerfile
235
+ file : ./build/docker/Dockerfile
235
236
target : production
236
237
tags : cytomining/pycytominer:latest,cytomining/pycytominer:${{ steps.env-vars.outputs.CLEAN_VERSION }}
237
238
# update docker hub description using readme on merge
238
- - name : Docker Hub
239
+ - name : Update Docker Hub repository description from readme
239
240
# only run this task if we have a pull request which is merged
240
- if : github.event.pull_request.merged && github.ref == 'refs/heads/main' && github.repository == 'cytomining/pycytominer'
241
+ if : github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'cytomining/pycytominer'
241
242
uses : peter-evans/dockerhub-description@v3
242
243
with :
243
244
username : ${{ secrets.DOCKER_USER }}
244
245
password : ${{ secrets.DOCKER_TOKEN }}
245
246
repository : cytomining/pycytominer
247
+ readme-filepath : " ${{ env.sdist_extracted_name }}/README.md"
0 commit comments