File tree Expand file tree Collapse file tree 2 files changed +26
-4
lines changed
Expand file tree Collapse file tree 2 files changed +26
-4
lines changed Original file line number Diff line number Diff line change 11name : nf-jdk build
22on :
3- schedule :
4- - cron : " 0 1 * * *"
3+
54 workflow_dispatch :
5+ push :
6+ branches : [main, master]
7+ paths :
8+ - ' Dockerfile*'
9+ - ' Makefile'
10+ - ' VERSION'
11+ - ' install-jemalloc.sh'
12+ - ' build-jemalloc.sh'
13+ - ' build-jemalloc-native.sh'
614
715permissions :
816 id-token : write
5967 username : ${{ secrets.SEQERA_CR_USERNAME }}
6068 password : ${{ secrets.SEQERA_CR_PASSWORD }}
6169
70+ - name : Set date tag (YYYYMMDD UTC)
71+ run : echo "DATE_TAG=$(date -u +%Y%m%d%H%M)" >> $GITHUB_ENV
72+
6273 - name : Build base image
63- run : make build-base version=${{ matrix.version }}
74+ run : make build-base version=${{ matrix.version }} DATE_TAG=${{ env.DATE_TAG }}
6475
6576 build-jemalloc-container :
6677 needs : get-versions
94105 username : ${{ secrets.SEQERA_CR_USERNAME }}
95106 password : ${{ secrets.SEQERA_CR_PASSWORD }}
96107
108+ - name : Set date tag (YYYYMMDD UTC)
109+ run : echo "DATE_TAG=$(date -u +%Y%m%d%H%M)" >> $GITHUB_ENV
110+
97111 - name : Build jemalloc image
98- run : make build-jemalloc version=${{ matrix.version }}
112+ run : make build-jemalloc version=${{ matrix.version }} DATE_TAG=${{ env.DATE_TAG }}
Original file line number Diff line number Diff line change 11repo = cr.seqera.io/public
22version ?= $(shell cat VERSION)
33image = nf-jdk:corretto-${version}
4+ image_jemalloc = nf-jdk:corretto-${version}-jemalloc
5+
6+ ifdef DATE_TAG
7+ immutable_tag = -t ${repo}/${image}-${DATE_TAG}
8+ immutable_tag_jemalloc = -t ${repo}/${image_jemalloc}-${DATE_TAG}
9+ endif
410
511# Versions to build (single source of truth for CI matrix)
612VERSIONS = 17-al2023 21-al2023 25-al2023
@@ -27,6 +33,7 @@ build-base:
2733 --platform linux/amd64,linux/arm64 \
2834 --build-arg BASE_IMAGE=$(BASE_IMAGE ) \
2935 -t ${repo} /${image} \
36+ $(immutable_tag ) \
3037 -f Dockerfile \
3138 --push \
3239 .
@@ -38,6 +45,7 @@ build-jemalloc:
3845 --platform linux/amd64,linux/arm64 \
3946 --build-arg BASE_IMAGE=$(BASE_IMAGE ) \
4047 -t ${repo} /${image} -jemalloc \
48+ $(immutable_tag_jemalloc ) \
4149 -f Dockerfile_jemalloc \
4250 --push \
4351 .
You can’t perform that action at this time.
0 commit comments