Create docker-publish.yml

This commit is contained in:
unroll3677
2025-07-16 14:14:04 +02:00
committed by GitHub
parent f795520ad6
commit faf443b5b7

25
.github/workflows/docker-publish.yml vendored Normal file
View File

@@ -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 }}/<jouw-app-naam>:latest