Update docker-image.yml
This commit is contained in:
20
.github/workflows/docker-image.yml
vendored
20
.github/workflows/docker-image.yml
vendored
@@ -7,12 +7,24 @@ on:
|
|||||||
branches: [ "main" ]
|
branches: [ "main" ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
build-and-push:
|
||||||
build:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
# Stap 1: Code ophalen
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# Stap 2: Inloggen bij Docker Hub
|
||||||
|
- name: Log in to Docker Hub
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
|
# Stap 3: Docker-image bouwen en taggen met commit hash
|
||||||
- name: Build the Docker image
|
- name: Build the Docker image
|
||||||
run: docker build . --file Dockerfile --tag weetikveel:${{ github.sha }}
|
run: docker build . --file Dockerfile --tag veenm/weetikveel:${{ github.sha }}
|
||||||
|
|
||||||
|
# Stap 4: Docker-image pushen naar Docker Hub
|
||||||
|
- name: Push the Docker image
|
||||||
|
run: docker push veenm/weetikveel:${{ github.sha }}
|
||||||
|
|||||||
Reference in New Issue
Block a user