Update README.md #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request_target: | |
branches: [ "main" ] | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@ec92e829475ac0c2315ea8f9eced72db85bb337a # v3.0.0 | |
- name: make application.yml | |
run: | | |
mkdir -p ./src/main/resources | |
cd ./src/main/resources | |
touch ./application.yml | |
touch ./application-prod.yml | |
echo "${{ secrets.APPLICATION }}" > ./application.yml | |
echo "${{ secrets.PROD }}" > ./application-prod.yml | |
- name: Test with Gradle | |
run: ./gradlew clean test --info --stacktrace | |
- name: Build with Gradle | |
run: ./gradlew build -x test | |
- name: Docker Login | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
- name: Build Docker Image | |
run: docker build --platform linux/amd64 -t ${{ secrets.DOCKERHUB_USERNAME }}/puang . | |
- name: Push Docker Image | |
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/puang |