Skip to content

Commit 502893e

Browse files
committed
update images
1 parent 1928f2f commit 502893e

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,10 @@ jobs:
2828
platform:
2929
- linux/amd64
3030
- linux/arm64
31-
3231
outputs:
3332
IMAGE_NAME: ${{ steps.image_builder.outputs.IMAGE }}
3433
TAGS: ${{ steps.meta.outputs.tags }}
3534
VERSION: ${{ steps.meta.outputs.version }}
36-
3735
steps:
3836
- name: Prepare
3937
run: |
@@ -43,26 +41,21 @@ jobs:
4341
- name: Checkout
4442
uses: actions/checkout@v4
4543

46-
- name: Normalize Tag Name
47-
id: normalize_tag
48-
run: |
49-
TAG="${GITHUB_REF_NAME//+/-}"
50-
echo "NORMALIZED_TAG=$TAG"
51-
echo "NORMALIZED_TAG=$TAG" >> $GITHUB_ENV
52-
echo "tags=$TAG" >> $GITHUB_OUTPUT
53-
5444
- name: Docker meta
5545
id: meta
5646
uses: docker/metadata-action@v5
5747
with:
5848
images: ${{ env.REGISTRY_IMAGE }}
5949
tags: |
60-
type=raw,value=${{ env.NORMALIZED_TAG }}
50+
type=ref,event=branch
51+
type=ref,event=pr
52+
type=semver,pattern={{version}}
53+
type=semver,pattern={{major}}.{{minor}}
6154
6255
- name: Image name builder
6356
id: image_builder
6457
run: |
65-
IMAGE=$(jq -ecr '.tags | map(select(match("${{ env.REGISTRY_IMAGE }}:[0-9]+\\.[0-9]+\\.[0-9]+(-[a-zA-Z0-9._]+)?", "i"))) | first' <<< "$DOCKER_METADATA_OUTPUT_JSON")
58+
IMAGE=$(jq -ecr '.tags | map(select(match("${{ env.REGEX_IMAGE }}", "i"))) | first| sub(":.*$";"") | sub("+";"-")' <<< "$DOCKER_METADATA_OUTPUT_JSON")
6659
echo "IMAGE=$IMAGE" >> $GITHUB_OUTPUT
6760
6861
- name: Set up QEMU

0 commit comments

Comments
 (0)