diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml new file mode 100644 index 0000000..46d0c3e --- /dev/null +++ b/.github/workflows/docker-hub.yml @@ -0,0 +1,20 @@ +name: Portfolio CI/CD + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - name: Build & Push Image + run: | + echo "${{ secrets.DOCKERHUB_PASSWORD }}" | docker login -u "${{secrets.DOCKERHUB_USERNAME}}" --password-stdin + docker image build . -t amirzenoozi/portfolio-react-app:latest + docker push amirzenoozi/portfolio-react-app:latest