Update CloudWatchMetricsService.java #26
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ๋ฐฑ์๋ ๋ฐฐํฌ | |
on: | |
push: | |
branches: [BE/chore/docker-test-2] | |
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 ./deploy.sh | |