refactor : 인바디 통계 - 최근 7일치로 변경 #47
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: Build and Push Docker Image | |
on: | |
push: | |
branches: | |
- develop | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Configure Docker daemon for insecure registry | |
run: | | |
echo '{"insecure-registries":["58.79.16.12:5000"]}' | sudo tee /etc/docker/daemon.json > /dev/null | |
sudo systemctl restart docker | |
- name: Log in to Docker registry using HTTP | |
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login http://58.79.16.12:5000 --username ${{ secrets.DOCKER_USERNAME }} --password-stdin | |
- name: Show build context files | |
run: ls -R | |
- name: Build Docker image | |
run: | | |
docker build --no-cache --build-arg REACT_APP_API_BASE_URL=${{ secrets.REACT_APP_API_BASE_URL }} -f Dockerfile -t 58.79.16.12:5000/athlete_user_frontend:${{ github.sha }} . | |
- name: Push Docker image to registry | |
run: | | |
docker push 58.79.16.12:5000/athlete_user_frontend:${{ github.sha }} | |
- name: Add additional tag and push | |
run: | | |
docker tag 58.79.16.12:5000/athlete_user_frontend:${{ github.sha }} 58.79.16.12:5000/athlete_user_frontend:latest | |
docker push 58.79.16.12:5000/athlete_user_frontend:latest |