Skip to content

Merge pull request #36 from SEMOSAN/feat/#17-redis-stream #14

Merge pull request #36 from SEMOSAN/feat/#17-redis-stream

Merge pull request #36 from SEMOSAN/feat/#17-redis-stream #14

Workflow file for this run

name: Deploy
on:
push:
branches: [main, develop]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: gradle
- name: Build with Gradle
run: ./gradlew build -x test --no-daemon --parallel --build-cache
- name: Set image name (lowercase)
run: echo "IMAGE=ghcr.io/$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/arm64
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: |
${{ env.IMAGE }}:${{ github.sha }}
${{ env.IMAGE }}:latest