Skip to content

chore: test 서버 mariadb 적용 #3

chore: test 서버 mariadb 적용

chore: test 서버 mariadb 적용 #3

Workflow file for this run

name: Create and publish a Docker image to Docker Hub, Deploy to Cloudtype
on:
push:
branches:
- test
env:
IMAGE_NAME: insurance_system
TEST_YML_PATH: ./src/main/resources/application-test.yml
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: application-test.yml setting
uses: microsoft/variable-substitution@v1
with:
files: ${{ env.TEST_YML_PATH }}
env:
spring.datasource.username: ${{ secrets.TEST_DB_USERNAME }}
spring.datasource.password: ${{ secrets.TEST_DB_PASSWORD }}
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}
tags: |
type=sha
- name: Build and push Docker image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Deploy to Cloudtype
uses: cloudtype-github-actions/deploy@v1
with:
token: ${{ secrets.CLOUDTYPE_TOKEN }}
project: love00huk/choihyeok
stage: main
yaml: |
name: insurancesystem
app: container
options:
ports: 8080
image: ${{ steps.meta.outputs.tags }}