Skip to content

🚀 feat: v0.1.9 배포 (#43) #17

🚀 feat: v0.1.9 배포 (#43)

🚀 feat: v0.1.9 배포 (#43) #17

Workflow file for this run

name: Create and publish a Docker image to user's own registry, Deploy to Cloudtype
on:
push:
branches:
- main
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
token: ${{ secrets.GHP_TOKEN }}
submodules: true
- uses: actions/setup-java@v3
with:
java-version: '19'
distribution: 'temurin'
- name: Run chmod to make gradlew executable
run: chmod +x ./gradlew
- name: Setup Gradle
uses: gradle/gradle-build-action@v2.4.0
with:
gradle-version: release-candidate
cache-disabled: true
arguments: build --scan
- uses: actions/upload-artifact@v3
with:
name: build-reports
path: build/reports
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GHP_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha
- name: Build and push Docker image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: ./app-maple-stamp-api
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: hyyena/maple-trend
stage: main
yaml: |
name: maple-trend-be
app: container
options:
ports: 9000
image: ${{ steps.meta.outputs.tags }}