Skip to content

Commit dd3a574

Browse files
committed
Tag images with ci- prefix instead
1 parent 1e6af16 commit dd3a574

2 files changed

Lines changed: 28 additions & 4 deletions

File tree

.github/workflows/docker-tag.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Tag new images version
2+
on:
3+
schedule:
4+
# Quarterly schedule, roughly aligned with JDK CPU
5+
- cron: '0 0 30 1,4,7,10 *'
6+
workflow_dispatch:
7+
8+
jobs:
9+
tag-images:
10+
name: Tag new images version
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
packages: write
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
18+
- name: Login to ghcr.io
19+
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # 3.7.0
20+
with:
21+
registry: ghcr.io
22+
username: ${{ github.actor }}
23+
password: ${{ secrets.GITHUB_TOKEN }}
24+
- name: Tag images
25+
run: ./build --tag

build

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,20 +233,19 @@ function do_push() {
233233
}
234234

235235
function do_tag() {
236-
local tag token version
236+
local tag
237237
TAG_PREFIX=
238238
echo "Pulling latest images"
239239
for tag in base latest "${BASE_VARIANTS[@]}" "${VARIANTS[@]}"; do
240240
tag="${tag,,}"
241241
tag="$(image_name "${tag}")"
242242
docker pull "$tag"
243243
done
244-
version="$(date +%y.%m)"
245-
echo "Tagging version $version"
244+
echo "Tagging ci- images"
246245
for tag in base latest "${BASE_VARIANTS[@]}" "${VARIANTS[@]}"; do
247246
tag="${tag,,}"
248247
tag="$(image_name "${tag}")"
249-
new_tag="${tag/:/:v$version-}"
248+
new_tag="${tag/:/:ci-}"
250249
docker tag "$tag" "$new_tag"
251250
docker push "$new_tag"
252251
done

0 commit comments

Comments
 (0)