-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #91 from nityatadepalli123/master
add kafka-connect sample to workflow
- Loading branch information
Showing
3 changed files
with
37 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Build & publish event-streams-samples images | ||
on: | ||
push: | ||
branches: ['master'] | ||
paths: | ||
- 'kafka-connect/**' | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
|
||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Log in to registry | ||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin | ||
- name: Run bash script | ||
run: bash kafka-connect/build.sh | ||
- name: Build image | ||
run: | | ||
docker build . --file kafka-connect/Dockerfile --tag eventstreams-kafka-connect:latest --label "latest" | ||
- name: Push image | ||
run: | | ||
IMAGE_ID=ghcr.io/${{ github.repository }}/eventstreams-kafka-connect:latest | ||
# This changes all uppercase characters to lowercase. | ||
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') | ||
echo IMAGE_ID=$IMAGE_ID | ||
docker tag eventstreams-kafka-connect:latest $IMAGE_ID | ||
docker push $IMAGE_ID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# test | ||
FROM gradle:jdk11-alpine as jdk | ||
|
||
COPY --chown=1000 . /usr/src/app | ||
|