test: update EventConsumerTest #39
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
name: Timeline Service Docker Hub Push | |
on: | |
push: | |
branches: | |
- 'timeline/dev' | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Cache Gradle dependencies | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
gradle- | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Grant execute permission for gradlew | |
run: chmod +x src/timeline-service/gradlew | |
- name: Build and Push Docker Image | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
PASSPORT_KEY: ${{ secrets.PASSPORT_KEY }} | |
PASSPORT_ALGORITHM: ${{ secrets.PASSPORT_ALGORITHM }} | |
TIMELINE_REDIS_HOST: ${{ secrets.TIMELINE_REDIS_HOST }} | |
TIMELINE_REDIS_PORT: ${{ secrets.TIMELINE_REDIS_PORT }} | |
TIMELINE_REDIS_PASSWORD: ${{ secrets.TIMELINE_REDIS_PASSWORD }} | |
KAFKA_SERVERS: ${{ secrets.KAFKA_SERVERS }} | |
run: | | |
cd src/timeline-service | |
./gradlew clean build -x test | |
docker run --privileged --rm tonistiigi/binfmt --install all | |
docker buildx create --use | |
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD | |
docker buildx build --platform=linux/amd64,linux/arm64 -t $DOCKER_USERNAME/timeline-service:latest . --push |