Skip to content

Update logback-spring.xml #29

Update logback-spring.xml

Update logback-spring.xml #29

name: ๋ฐฑ์—”๋“œ ๊ฐœ๋ฐœ์„œ๋ฒ„ ๋ฐฐํฌ
on:
push:
branches: [BE/chore/docker-test-3]
permissions:
checks: write
jobs:
build-and-push:
defaults:
run:
working-directory: backend
runs-on: ubuntu-latest
steps:
- name: ์ฒดํฌ์•„์›ƒ
uses: actions/checkout@v3
with:
token: ${{ secrets.ACTION_TOKEN }}
submodules: recursive
- name: ์„œ๋ธŒ๋ชจ๋“ˆ ์—…๋ฐ์ดํŠธ
run: |
git submodule update --remote --recursive
- name: ์„œ๋ธŒ๋ชจ๋“ˆ ์ปค๋ฐ‹
run: |
git config --global user.name 'poi1649'
git config --global user.email '[email protected]'
git remote set-url origin https://x-access-token:${{ secrets.ACTION_TOKEN }}@github.com/${{ github.repository }}
git commit -am "Auto updated submodule references" && git push || echo "No changes to commit"
- name: JDK17 ์„ค์น˜
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
- name: Gradle์— ๊ถŒํ•œ๋ถ€์—ฌ
run: chmod +x gradlew
- name: Test ๋ฐ ๋นŒ๋“œ ์‹คํ–‰
run: ./gradlew build
- name: ๋„์ปค ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ ์„ค์ •
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
with:
images: yigongil/spring
tag-semver: |
{{version}}
{{major}}.{{minor}}
- name: ๋„์ปค ํ—ˆ๋ธŒ ๋กœ๊ทธ์ธ
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: ๋„์ปค ์ด๋ฏธ์ง€ ๋นŒ๋“œ ํ›„ ํ—ˆ๋ธŒ์— ์—…๋กœ๋“œ
uses: docker/build-push-action@v2
with:
context: .
file: ./backend/Dockerfile
platforms: linux/amd64
push: true
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
deploy:
runs-on: self-hosted
if: ${{ needs.build-and-push.result == 'success' }}
needs: [ build-and-push ]
steps:
- name: ๋„์ปค ํ’€ / ํŒŒ์ผ ์‹คํ–‰
run: |
cd ~
sudo bash ./dev-deploy.sh