비밀번호 재설정 API 수정 (로그인한 유저의 경우 처리) (#128) #6
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: Docker CI/CD PIPELINE | |
on: | |
push: | |
branches: ['main'] | |
jobs: | |
CI: | |
runs-on: ubuntu-latest | |
env: | |
DOCKER_HUB_REPO: ${{ secrets.DOCKER_HUB_REPO }} | |
DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Login Dockerhub | |
run: echo "$DOCKER_HUB_TOKEN" | docker login --username $DOCKER_HUB_REPO --password-stdin | |
- name: auto increment tag | |
id: tag | |
uses: sophiware/actions-auto-increment-tag@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build the Docker image | |
run: docker build . --file Dockerfile --tag $DOCKER_HUB_REPO/add-be:${{ steps.tag.outputs.tag }} | |
- name: Push to docker hub repository | |
run: | | |
docker push $DOCKER_HUB_REPO/add-be:${{ steps.tag.outputs.tag }} | |
docker tag $DOCKER_HUB_REPO/add-be:${{ steps.tag.outputs.tag }} $DOCKER_HUB_REPO/add-be:latest | |
docker push $DOCKER_HUB_REPO/add-be:latest | |
CD: | |
runs-on: self-hosted | |
needs: CI | |
env: | |
DOCKER_HUB_REPO: ${{ secrets.DOCKER_HUB_REPO }} | |
DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Login Dockerhub | |
run: echo "$DOCKER_HUB_TOKEN" | docker login --username $DOCKER_HUB_REPO --password-stdin | |
- name: Change new version container | |
run: | | |
cd /home/ec2-user/workspace/docker-compose | |
docker-compose -f add-be.yml down | |
docker-compose -f add-be.yml pull | |
docker-compose -f add-be.yml up -d |