diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 891ddfc..343e4b8 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -29,5 +29,21 @@ jobs: - name: Build Docker image run: | docker build -t flask-app:latest . + + - name: Get current time + run: echo "CURRENT_TIME=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_ENV # Optional: Add additional steps to push the Docker image to a registry like Docker Hub + - name: Log in to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and push Docker image + uses: docker/build-push-action@v2 + with: + context: . + file: ./Dockerfile + push: true + tags: lewisjlee/flask-app-github-action-test:${{ env.CURRENT_TIME }} diff --git a/app/app.py b/app/app.py index 7a084da..d39a1e1 100644 --- a/app/app.py +++ b/app/app.py @@ -1,3 +1,4 @@ +#이것은 작업 테스트!!! from flask import Flask app = Flask(__name__) diff --git a/tests/test_app.py b/tests/test_app.py index 8cdc7c7..d559f21 100644 --- a/tests/test_app.py +++ b/tests/test_app.py @@ -1,3 +1,4 @@ +#테스트! import unittest from app.app import app