Skip to content

Commit

Permalink
Merge pull request #2 from FullAccel/sejoon00-patch-1
Browse files Browse the repository at this point in the history
Create �CI.yml
  • Loading branch information
sejoon00 authored May 26, 2024
2 parents a45fb6f + 78fe6cf commit bb02c6c
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle

name: Gradle Package

on:
pull_request:
branches: ["master"]

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: checkout
uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: create application-aws.yml
run:
mkdir ./src/main/resources
cd ./src/main/resources

touch ./application-aws.yml

echo "${{ secrets.YML-AWS }}" >> ./application-aws.yml

cat ./application-aws.yml


- name: build
run: |
chmod +x gradlew
./gradlew build -x test
- name: Docker hub login
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_ID }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}


- name: Docker image build
run: |
docker build -t ${{secrets.DOCKERHUB_ID}}/Cheada-spring .
- name: Docker Hub push
run: docker push ${{secrets.DOCKERHUB_ID}}/Cheada-spring

0 comments on commit bb02c6c

Please sign in to comment.