Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmoonl1ght94 committed Oct 7, 2024
1 parent 6bb1b4d commit 11b0bbf
Showing 1 changed file with 19 additions and 10 deletions.
29 changes: 19 additions & 10 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'Docker Build and Push'
description: 'Build Docker image and optionally push to ECR'
description: 'Build Docker image and push to ECR'

inputs:
tag:
Expand All @@ -10,16 +10,12 @@ inputs:
required: true
aws-access-key-id:
description: 'AWS Access Key ID'
required: false
required: true
secret: true
aws-secret-access-key:
description: 'AWS Secret Access Key'
required: false
required: true
secret: true
push:
description: 'Push the Docker image to ECR'
required: false
default: 'false'

runs:
using: "composite"
Expand All @@ -39,13 +35,26 @@ runs:
restore-keys: |
${{ runner.os }}-buildx-
- name: Build Docker image
id: docker_build
- name: Configure AWS credentials for Kafka-UI account
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ inputs.aws-access-key-id }}
aws-secret-access-key: ${{ inputs.aws-secret-access-key }}
aws-region: us-east-1

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
with:
registry-type: 'public'

- name: Build and push Docker image
id: docker_build_and_push
uses: docker/build-push-action@v5
with:
builder: ${{ steps.buildx.outputs.name }}
context: api
push: ${{ inputs.push == 'true' }}
push: true
tags: public.ecr.aws/kafbat/kafka-ui-custom-build:${{ inputs.tag }}
build-args: |
JAR_FILE=api-${{ inputs.version }}.jar
Expand Down

0 comments on commit 11b0bbf

Please sign in to comment.