Skip to content

Chore: Procfile add

Chore: Procfile add #9

Workflow file for this run

name: tuna-study-cicd
permissions:
contents: read
pull-requests: write
on:
push:
branches: ["main", "develop"]
pull_request:
branches: ["main", "develop"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'corretto'
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
shell: bash
- name: Create application.yml.template
run: |
mkdir -p src/main/resources
cat > src/main/resources/application.yml.template <<EOL
server:
port: 8081
spring:
datasource:
driver-class-name: org.mariadb.jdbc.Driver
url: jdbc:mariadb://\${RDS_HOSTNAME}:\${RDS_PORT}/\${RDS_DB_NAME}
username: \${RDS_USERNAME}
password: \${RDS_PASSWORD}
jpa:
hibernate:
ddl-auto: update
show-sql: true
properties:
hibernate:
format_sql: true
use_sql_comments: true
EOL
- name: Set Yaml
run: |
envsubst < src/main/resources/application.yml.template > src/main/resources/application.yml
echo "Generated application.yml:"
cat src/main/resources/application.yml
env:
RDS_HOSTNAME: ${{ secrets.RDS_HOSTNAME }}
RDS_PORT: ${{ secrets.RDS_PORT }}
RDS_DB_NAME: ${{ secrets.RDS_DB_NAME }}
RDS_USERNAME: ${{ secrets.RDS_USERNAME }}
RDS_PASSWORD: ${{ secrets.RDS_PASSWORD }}
- name: Build with Gradle
run: ./gradlew clean build -x test
shell: bash
- name: List build/libs directory
run: ls -la build/libs
shell: bash
- name: Get current time
uses: 1466587594/get-current-time@v2
id: current-time
with:
format: YYYY-MM-DDTHH-mm-ss
utcOffset: "+09:00"
- name: Show Current Time
run: echo "CurrentTime=${{steps.current-time.outputs.formattedTime}}"
shell: bash
- name: Copy JAR file
run: |
mkdir -p deploy
cp build/libs/TUNA-STUDY-CICD-0.0.1-SNAPSHOT.jar deploy/application.jar