Skip to content

Commit 3280bf7

Browse files
committed
update: code review
Signed-off-by: Wen Zhou <wenzhou@redhat.com>
1 parent 8fabb89 commit 3280bf7

File tree

4 files changed

+21
-11
lines changed

4 files changed

+21
-11
lines changed

.github/actions/docker-build-and-push/action.yml

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,37 @@ runs:
2828
uses: docker/setup-buildx-action@v3
2929

3030
- name: Login to GitHub Container Registry
31-
run: echo "${{ inputs.github-token }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
31+
run: echo "${GITHUB_TOKEN}" | docker login ghcr.io -u "${GITHUB_ACTOR}" --password-stdin
3232
shell: bash
33+
env:
34+
GITHUB_TOKEN: ${{ inputs.github-token }}
3335

3436
- name: Print image info
3537
run: |
36-
echo "Image name: ${{ inputs.image-name }}"
37-
echo "Tag: ${{ inputs.tag }}"
38-
echo "Registry: ${{ inputs.registry }}"
38+
echo "Image name: ${IMAGE_NAME}"
39+
echo "Tag: ${TAG}"
40+
echo "Registry: ${REGISTRY}"
3941
shell: bash
42+
env:
43+
IMAGE_NAME: ${{ inputs.image-name }}
44+
TAG: ${{ inputs.tag }}
45+
REGISTRY: ${{ inputs.registry }}
4046

4147
- name: Build image and push
4248
run: |
4349
DOCKERFILE_ARG=""
44-
if [ -n "${{ inputs.dockerfile }}" ]; then
45-
DOCKERFILE_ARG="-f ${{ inputs.dockerfile }}"
50+
if [ -n "${DOCKERFILE}" ]; then
51+
DOCKERFILE_ARG="-f ${DOCKERFILE}"
4652
fi
4753
docker buildx build \
4854
--platform linux/amd64 \
4955
${DOCKERFILE_ARG} \
50-
-t ${{ inputs.registry }}/${{ inputs.image-name }}:${{ inputs.tag }} \
51-
--push ${{ inputs.context }}
56+
-t "${REGISTRY}/${IMAGE_NAME}:${TAG}" \
57+
--push "${CONTEXT}"
5258
shell: bash
59+
env:
60+
DOCKERFILE: ${{ inputs.dockerfile }}
61+
REGISTRY: ${{ inputs.registry }}
62+
IMAGE_NAME: ${{ inputs.image-name }}
63+
TAG: ${{ inputs.tag }}
64+
CONTEXT: ${{ inputs.context }}

.github/workflows/ci-release-uds-tokenizer.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
uses: actions/checkout@v6
1717

1818
- name: Set up Docker Buildx
19-
uses: docker/setup-buildx-action@v4
19+
uses: docker/setup-buildx-action@v3
2020

2121
- name: Login to GitHub Container Registry
2222
if: github.event_name == 'push'

services/uds_tokenizer/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ FROM --platform=$TARGETPLATFORM python:3.10-slim as builder
1717

1818
# Set build arguments
1919
ARG TARGETPLATFORM
20-
ARG BUILDPLATFORM
2120

2221
# Set working directory
2322
WORKDIR /app

services/uds_tokenizer/Dockerfile.konflux

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ FROM --platform=$TARGETPLATFORM registry.access.redhat.com/ubi9/python-312:9.7 a
1717

1818
# Set build arguments
1919
ARG TARGETPLATFORM
20-
ARG BUILDPLATFORM
2120

2221
# Set working directory
2322
WORKDIR /app

0 commit comments

Comments
 (0)