diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..32c6b1c --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,23 @@ +name: Build and Push Docker Image to Docker Hub + +on: push +jobs: + push_to_registry: + name: push docker image to hub + runs-on: ubuntu-latest + steps: + - name: check repository + uses: actions/checkout@v4 + + - name: login to docker registry + uses: docker/login-action@v3 + with: + username: ${{secrets.DOCKERHUB_USERNAME}} + password: ${{secrets.DOCKERHUB_TOKEN}} + + - name: build and push docker image to registry + uses: docker/build-push-action@v5 + with: + context: ./Dockerfile + push: true + tags: vikram1202/picpilot:latest