Skip to content

Commit

Permalink
Merge pull request #5 from EducationPerfect/push-to-repository
Browse files Browse the repository at this point in the history
Push to ECR
  • Loading branch information
AlexeyRaga authored Jun 13, 2024
2 parents a48671c + d5061f8 commit 501fc30
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
release:
# runs on main repo only
if: github.repository == 'seglo/kafka-lag-exporter'
if: github.repository == 'EducationPerfect/kafka-lag-exporter'
name: Release
runs-on: ubuntu-22.04
strategy:
Expand All @@ -32,11 +32,16 @@ jobs:
- name: Cache Coursier cache
uses: coursier/cache-action@v6

- name: Login to Docker Hub
uses: docker/login-action@v1
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
aws-region: ap-southeast-2
role-to-assume: arn:aws:iam::058337015204:role/github-actions/${{ steps.setup.outputs.repository_name }}
role-session-name: github-actions-tf

- name: Login to Amazon ECR
uses: aws-actions/amazon-ecr-login@v2
id: login-ecr

- name: Build, test, and publish
run: |+
Expand Down
6 changes: 3 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ lazy val kafkaLagExporter =
),
dockerApiVersion := Some(DockerApiVersion(1, 41)),
dockerRepository := Option(System.getenv("DOCKER_REPOSITORY"))
.orElse(Some("058337015204.dkr.ecr.ap-southeast-2.amazonaws.com")),
.orElse(Some("058337015204.dkr.ecr.ap-southeast-2.amazonaws.com/kafka")),
dockerUsername := Option(System.getenv("DOCKER_USERNAME"))
.orElse(None),
dockerUpdateLatest := true,
Expand Down Expand Up @@ -100,8 +100,8 @@ lazy val kafkaLagExporter =
}
Seq(
Cmd("FROM", "eclipse-temurin:17-jre-alpine"),
Cmd("RUN", "apk add --no-cache bash"),
Cmd("RUN", "adduser -S -u 1001 kafkalagexporter"),
// Cmd("RUN", "apk add --no-cache bash"),
// Cmd("RUN", "adduser -S -u 1001 kafkalagexporter"),
Cmd("WORKDIR", "/opt/docker"),
Cmd("USER", "1001"),
Cmd("LABEL", labels)
Expand Down

0 comments on commit 501fc30

Please sign in to comment.