From 6de80148d9474d9a952cb9955675877b500ffb9a Mon Sep 17 00:00:00 2001 From: Jakub Both Date: Wed, 10 Apr 2024 12:14:32 +0200 Subject: [PATCH] MAINT: Add dockhub workflow --- .github/workflows/docker-hub.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/docker-hub.yml diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml new file mode 100644 index 00000000..a4a4703c --- /dev/null +++ b/.github/workflows/docker-hub.yml @@ -0,0 +1,32 @@ +name: Publish Docker image for main branch + +on: + workflow_dispatch: + # run jobs manually + push: + branches: + - main + +jobs: + push_to_registry: + name: Push Docker image to Docker Hub + runs-on: ubuntu-latest + steps: + - name: Check out the repo + 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 and push stable + uses: docker/build-push-action@v3 + with: + context: ./ + file: ./dockerfiles/Dockerfile + builder: ${{ steps.buildx.outputs.name }} + push: true + tags: ${{ github.repository }}/stable:latest +