Skip to content

Commit

Permalink
Update docker-image.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
sorenwacker authored Jul 29, 2024
1 parent dbb2001 commit 970ef6c
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,27 @@ name: Docker Image CI
on:
push:
branches:
- dockerhub
- dockerhub # Trigger workflow on pushes to the dockerhub branch
release:
types: [published]
workflow_dispatch: # Allows manual triggering if needed
types: [published] # Trigger workflow on new releases
workflow_dispatch: # Allows manual triggering from GitHub UI

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Checkout code
uses: actions/checkout@v3

- name: Docker login
env:
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USER }}" --password-stdin
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USER }}" --password-stdin

- name: Build Docker Image
run: docker build . --file Dockerfile --tag your-docker-repo/your-image:latest --no-cache

- name: Push Docker Image
run: docker push your-docker-repo/your-image:latest

0 comments on commit 970ef6c

Please sign in to comment.