Skip to content

Commit

Permalink
cd: Add cd workflow for spring backend
Browse files Browse the repository at this point in the history
  • Loading branch information
Arabasta committed Jul 13, 2024
1 parent fd16100 commit 4c1f7ec
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/cd_spring_backend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CD

on:
push:
branches:
- 'release/v[0-9]+.[0-9]+'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven

- name: Build with Maven
run: mvn -B package --file pom.xml

- name: Set up Docker buildx
uses: docker/setup-buildx-action@v3

- name: login to docker hub
uses: docker/login-action@v3
with:
username: ${{ secrets.KEI_DOCKER_USERNAME }}
password: ${{ secrets.KEI_DOCKER_PASSWORD }}

- name: build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ secrets.KEI_DOCKER_USERNAME }}/oracle_spring_backend:${{ github.sha }}

0 comments on commit 4c1f7ec

Please sign in to comment.