Skip to content

feat : implement of aws-lamda using spring cloud (#550) #195

feat : implement of aws-lamda using spring cloud (#550)

feat : implement of aws-lamda using spring cloud (#550) #195

name: aws-lambda-project
on:
push:
paths:
- "aws-lambda-project/**"
branches: [main]
pull_request:
paths:
- "aws-lambda-project/**"
types:
- opened
- synchronize
- reopened
jobs:
build:
name: Build
runs-on: ubuntu-latest
defaults:
run:
working-directory: "aws-lambda-project"
strategy:
matrix:
distribution: [ 'temurin' ]
java: [ '17' ]
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Setup Java ${{ matrix.java }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: ${{ matrix.distribution }}
cache: 'maven'
- name: Build with Maven
run: ./mvnw clean verify
- if: ${{ github.ref == 'refs/heads/main' }}
name: Build and Publish Docker Image
run: |
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
./mvnw spring-boot:build-image -Dspring-boot.build-image.imageName=${{ secrets.DOCKER_USERNAME }}/aws-lambda-project-${{ matrix.java }}
docker push ${{ secrets.DOCKER_USERNAME }}/aws-lambda-project-${{ matrix.java }}