Skip to content

Commit 50051dc

Browse files
committed
Adds GitHub Actions workflow to publish Docker images on tag.
1 parent cd081c9 commit 50051dc

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,3 +197,33 @@ jobs:
197197
artifacts/dist-linux/*.tar.gz
198198
env:
199199
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
200+
201+
publish-docker:
202+
name: Publish Docker Image
203+
runs-on: ubuntu-latest
204+
needs: [build-arm64, build-intel, build-windows, build-linux] # Ensure all desktop builds are done
205+
steps:
206+
- name: Checkout repository
207+
uses: actions/checkout@v4
208+
209+
- name: Log in to Docker Hub
210+
uses: docker/login-action@v3
211+
with:
212+
username: ${{ secrets.DOCKER_USERNAME }}
213+
password: ${{ secrets.DOCKER_PASSWORD }}
214+
215+
- name: Extract Docker metadata
216+
id: meta
217+
uses: docker/metadata-action@v5
218+
with:
219+
images: gandulf78/podcast_generator
220+
tags: |
221+
type=ref,event=tag # Use the Git tag (e.g., v1.0.0) as the Docker tag
222+
223+
- name: Build and push Docker image
224+
uses: docker/build-push-action@v5
225+
with:
226+
context: .
227+
push: true
228+
tags: ${{ steps.meta.outputs.tags }}
229+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)