Skip to content

Commit

Permalink
ci: publish to docker hub only for actual app changes
Browse files Browse the repository at this point in the history
Signed-off-by: Eiko Wagenknecht <[email protected]>
  • Loading branch information
eikowagenknecht committed Feb 10, 2025
1 parent c9e77a0 commit dc8479d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
name: publish-docker
on:
push:
# Run on main branch commits
# Only run on specific commit types in main branch
branches: [main]
# Run after a release is created
tags:
Expand All @@ -20,6 +20,15 @@ concurrency:

jobs:
build-and-publish:
# Only publish on main branch for specific commit types
if: |
github.ref == 'refs/heads/main' && (
startsWith(github.event.head_commit.message, 'feat:') ||
startsWith(github.event.head_commit.message, 'fix:') ||
startsWith(github.event.head_commit.message, 'perf:')
) ||
startsWith(github.ref, 'refs/tags/v') ||
github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down

0 comments on commit dc8479d

Please sign in to comment.