From faf443b5b7a764fcbb980a7435097567143d6361 Mon Sep 17 00:00:00 2001 From: unroll3677 Date: Wed, 16 Jul 2025 14:14:04 +0200 Subject: [PATCH] Create docker-publish.yml --- .github/workflows/docker-publish.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/docker-publish.yml diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml new file mode 100644 index 0000000..d3065eb --- /dev/null +++ b/.github/workflows/docker-publish.yml @@ -0,0 +1,25 @@ +name: Push to Docker Hub + +on: + push: + branches: [ "main" ] + +jobs: + build-and-push: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push Docker image + uses: docker/build-push-action@v4 + with: + context: . + push: true # <- BELANGRIJK: staat nu op 'true' + tags: ${{ secrets.DOCKERHUB_USERNAME }}/:latest