Skip to content

🐞 hotfix(error): 배포 주의 문구 수정 #36

🐞 hotfix(error): 배포 주의 문구 수정

🐞 hotfix(error): 배포 주의 문구 수정 #36

# 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 Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Push Image to DockerHub ver Dev
on:
push:
branches: [dev]
# Publish semver tags as releases.
# tags: ['v*.*.*']
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
#JDK Setting
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
#Gradle Caching
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: ${{ runner.os }}-gradle-
#Grant gradlew Permission
- name: Grant execute permission for gradlew
run: chmod +x gradlew
#Gradle Build
- name: Build with Gradle
run: ./gradlew build -x test
#Image Tagging
- name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
with:
images: ${{ secrets.DOCKER_REPOSITORY_DEV }}/hongeat-dev
tag-semver: |
{{version}}
{{major}}.{{minor}}
#Docker Buildx Setup
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
#Login to DockerHub
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME_DEV }}
password: ${{ secrets.DOCKER_PASSWORD_DEV }}
#Docker Build and Push
- name: Docker build & push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: linux/amd64
push: true
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
#workflow_dispatch
- run: gh api /repos/HongEat-Team/HongEat-Deploy/dispatches -f event_type='backend_event'
env:
GITHUB_TOKEN: ${{ secrets.DISPATCH_KEY }}