diff --git a/.github/workflows/github-ci.yml b/.github/workflows/github-ci.yml index cd51319..4550d47 100644 --- a/.github/workflows/github-ci.yml +++ b/.github/workflows/github-ci.yml @@ -1,7 +1,3 @@ -# This file is a template and might need editing before it works on your project. -# This is a sample GitHub Actions workflow that demonstrates a basic 3-step CI/CD pipeline. -# Instead of real tests or scripts, it uses echo commands to simulate the pipeline execution. - name: CI/CD Pipeline on: @@ -14,14 +10,20 @@ jobs: name: Build runs-on: ubuntu-latest steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 + - name: Log in to Docker Hub uses: docker/login-action@v1 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + - name: Build Docker image run: docker build -t ${{ secrets.DOCKER_USERNAME }}/todoapp:main . - - name : Publish to Docker Hub + + - name: Publish to Docker Hub run: docker push ${{ secrets.DOCKER_USERNAME }}/todoapp:main