diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 0000000..58ec1f5 --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,27 @@ +name: Docker Image CI + +on: + push: + branches: [ "main" ] + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - name: Check out the code + uses: actions/checkout@v3 + - name: Log in to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_PASSWORD }} + - name: Build image + run: docker build . --file Dockerfile --tag scr4pp/go_load_balancer:latest + - name: Push Image + uses: docker/build-push-action@v2 + with: + push: true + tags: scr4pp/go_load_balancer:latest