Skip to content

[관리자] 작가 포트폴리오 이미지 추가,조회 (#85) #11

[관리자] 작가 포트폴리오 이미지 추가,조회 (#85)

[관리자] 작가 포트폴리오 이미지 추가,조회 (#85) #11

Workflow file for this run

name: Build and Push Docker Image
on:
push:
branches:
- dev
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create src/main/resources/bootstrap.yml
run: |
mkdir -p src/main/resources
echo "encrypt:" > src/main/resources/bootstrap.yml
echo " key: '${{ secrets.ENCRYPTKEY }}'" >> src/main/resources/bootstrap.yml
- name: Login to GitHub Container Registry
run: echo ${{ secrets.GTOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Create Release Name
id: release_name
run: |
echo "::set-output name=release_name::v-$(date +'%Y.%m.%d-%H%M%S')"
- name: Build and Push Docker Dev Image
run: |
RELEASE_NAME="${{ steps.release_name.outputs.release_name }}"
docker build --build-arg SPRING_PROFILES_ACTIVE=dev -t my-admin-server:latest -f multistage.Dockerfile .
docker tag my-admin-server:latest ghcr.io/liberty52/liberty52-admin-server:dev-$RELEASE_NAME
docker push ghcr.io/liberty52/liberty52-admin-server:dev-$RELEASE_NAME
- name: Create GitHub Release
uses: actions/create-release@v1
with:
tag_name: ${{ steps.release_name.outputs.release_name }}
release_name: Release ${{ steps.release_name.outputs.release_name }}
generateReleaseNotes: true
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GTOKEN }}
- name: Clean up
run: docker logout ghcr.io