1616 REGISTRY : ghcr.io
1717 # Note: github.repository corresponds to <account>/<repo>
1818 IMAGE_NAME : ${{ github.repository }}
19- DOCKERFILE_NAME : Dockerfile
19+ hpccm-recipe-cumulative.py_NAME : Dockerfile
2020 DOCKER_DIR_SYS : sys
2121 IMAGE_TAG_SYS : sys
2222 DOCKER_DIR_GIT : git
8181 uses : docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
8282 with :
8383 context : docker/${{ env.DOCKER_DIR_SYS }}
84- file : docker/${{ env.DOCKER_DIR_SYS }}/${{ env.DOCKERFILE_NAME }}
84+ file : docker/${{ env.DOCKER_DIR_SYS }}/${{ env.hpccm-recipe-cumulative.py_NAME }}
8585 push : false
8686 tags : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG_SYS }}
8787 labels : ${{ steps.meta.outputs.labels }}
@@ -129,7 +129,7 @@ jobs:
129129 uses : docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
130130 with :
131131 context : docker/${{ env.DOCKER_DIR_GIT }}
132- file : docker/${{ env.DOCKER_DIR_GIT }}/${{ env.DOCKERFILE_NAME }}
132+ file : docker/${{ env.DOCKER_DIR_GIT }}/${{ env.hpccm-recipe-cumulative.py_NAME }}
133133 push : false
134134 tags : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG_GIT }}
135135 labels : ${{ steps.meta.outputs.labels }}
@@ -208,7 +208,7 @@ jobs:
208208 uses : docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
209209 with :
210210 context : docker/${{ env.DOCKER_DIR_INSTALL }}
211- file : docker/${{ env.DOCKER_DIR_INSTALL }}/${{ env.DOCKERFILE_NAME }}
211+ file : docker/${{ env.DOCKER_DIR_INSTALL }}/${{ env.hpccm-recipe-cumulative.py_NAME }}
212212 push : false
213213 build-args : |
214214 "IMAGE_GIT=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG_GIT }}"
@@ -228,7 +228,7 @@ jobs:
228228 with :
229229 context : docker/${{ env.DOCKER_DIR_CONFIG }}
230230 load : true
231- file : docker/${{ env.DOCKER_DIR_CONFIG }}/${{ env.DOCKERFILE_NAME }}
231+ file : docker/${{ env.DOCKER_DIR_CONFIG }}/${{ env.hpccm-recipe-cumulative.py_NAME }}
232232 push : false
233233 build-args : |
234234 "IMAGE_INSTALL=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG_INSTALL }}"
@@ -249,7 +249,7 @@ jobs:
249249 uses : docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
250250 with :
251251 context : docker/${{ env.DOCKER_DIR_CONFIG }}
252- file : docker/${{ env.DOCKER_DIR_CONFIG }}/${{ env.DOCKERFILE_NAME }}
252+ file : docker/${{ env.DOCKER_DIR_CONFIG }}/${{ env.hpccm-recipe-cumulative.py_NAME }}
253253 push : ${{ github.event_name == 'release' }}
254254 build-args : |
255255 "IMAGE_INSTALL=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG_INSTALL }}"
@@ -276,7 +276,7 @@ jobs:
276276 uses : docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
277277 with :
278278 context : docker/${{ env.DOCKER_DIR_ADDITIONAL }}
279- file : docker/${{ env.DOCKER_DIR_ADDITIONAL }}/${{ env.DOCKERFILE_NAME }}
279+ file : docker/${{ env.DOCKER_DIR_ADDITIONAL }}/${{ env.hpccm-recipe-cumulative.py_NAME }}
280280 push : ${{ github.event_name == 'release' }}
281281 build-args : |
282282 "IMAGE_MINIMAL=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.version }}-minimal"
@@ -318,10 +318,57 @@ jobs:
318318 git config user.name "OpenKIM Bot"
319319
320320 # Replace the first line of the Dockerfile with the new version
321- echo "FROM ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.version }}-minimal" > Dockerfile_
322- tail -n +2 Dockerfile >> Dockerfile_
323- mv Dockerfile_ Dockerfile
321+ echo "FROM ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.version }}-minimal" > hpccm-recipe-cumulative.py_
322+ tail -n +2 Dockerfile >> hpccm-recipe-cumulative.py_
323+ mv hpccm-recipe-cumulative.py_ Dockerfile
324324 git add Dockerfile
325325 git commit -m "upversion KDP base image"
326326 git push
327327
328+ - name : Update openkim-pipeline repo to latest KDP
329+ run : |
330+ BRANCH_NAME="update-KDP-to-${{ steps.meta.outputs.version }}"
331+
332+ # Store the PAT in a file that can be accessed by the
333+ # GitHub CLI.
334+ echo "${{ secrets.KDP_AND_PIPELINE_PUSH_AND_PR_TOKEN }}" > token.txt
335+ gh auth login --with-token < token.txt
336+ gh auth setup-git
337+
338+ # Clone the repo
339+ gh repo clone openkim/openkim-pipeline
340+ cd openkim-pipeline/singularity
341+ git checkout devel
342+
343+ # Setup the committers identity.
344+ git config user.email "noreply@openkim.org"
345+ git config user.name "OpenKIM Bot"
346+
347+ # Create a new feature branch for the changes.
348+ git checkout -b $BRANCH_NAME
349+
350+ echo "\"\"\"Recipe script for the Nvidia HPC Container Maker (hpccm)" > hpccm-recipe-cumulative.py_
351+ echo "" >> hpccm-recipe-cumulative.py_
352+ echo " https://github.com/NVIDIA/hpc-container-maker" >> hpccm-recipe-cumulative.py_
353+ echo "" >> hpccm-recipe-cumulative.py_
354+ echo "Usage:" >> hpccm-recipe-cumulative.py_
355+ echo " $ hpccm --recipe hpccm-recipe-cumulative.py --format docker > Dockerfile" >> hpccm-recipe-cumulative.py_
356+ echo " $ docker build -t=\"singularity-single-node:${{ steps.meta.outputs.version }}\" -f Dockerfile ." >> hpccm-recipe-cumulative.py_
357+ echo " $ docker save singularity-single-node:${{ steps.meta.outputs.version }} -o singularity_single_node_${{ steps.meta.outputs.version }}.tar" >> hpccm-recipe-cumulative.py_
358+ echo " $ singularity build singularity-single-node_${{ steps.meta.outputs.version }}.sif docker-archive://singularity_single_node_${{ steps.meta.outputs.version }}.tar" >> hpccm-recipe-cumulative.py_
359+ echo "\"\"\"" >> hpccm-recipe-cumulative.py_
360+ echo "# experimental base of the KDP" >> hpccm-recipe-cumulative.py_
361+ echo "BASE_IMAGE_NAME = \"ghcr.io/openkim/developer-platform:${{ steps.meta.outputs.version }}\"" >> hpccm-recipe-cumulative.py_
362+
363+ tail -n +13 hpccm-recipe-cumulative.py >> hpccm-recipe-cumulative.py_
364+ mv hpccm-recipe-cumulative.py_ hpccm-recipe-cumulative.py
365+ git add hpccm-recipe-cumulative.py
366+ git commit -m "upversion KDP base image"
367+ git push origin $BRANCH_NAME
368+
369+ # create a pull-request containing the updates.
370+ gh pr create \
371+ --body "Automatic PR to upversion KDP to ${{ steps.meta.outputs.version }}" \
372+ --title "update KDP to ${{ steps.meta.outputs.version }}" \
373+ --head "$BRANCH_NAME" \
374+ --base "devel"
0 commit comments