diff --git a/.github/workflows/publish_docker_image.yml b/.github/workflows/publish_docker_image.yml new file mode 100644 index 0000000..6ed4300 --- /dev/null +++ b/.github/workflows/publish_docker_image.yml @@ -0,0 +1,27 @@ +name: Publish docker image + +on: + push: + branches: ['main'] + +env: + REGISTRY: registry.humanitec.io/public + IMAGE_NAME: sample-score-app + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Build and push Docker image + uses: mr-smithers-excellent/docker-build-push@v6 + with: + image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + registry: ${{ env.REGISTRY }} + username: ${{ secrets.REGISTRY_USER }} + password: ${{ secrets.REGISTRY_PASSWORD }} + tags: latest + \ No newline at end of file