Skip to content

Commit

Permalink
fix: only trigger Docker build on version tags
Browse files Browse the repository at this point in the history
  • Loading branch information
tobbee committed Nov 1, 2024
1 parent c6007d7 commit 2b654a1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Publish Docker image
name: Publish Docker image on new version

on:
push:
branches:
- main
tags:
- 'v*' # Push events to matching v*, i.e. v1.1.2

jobs:
build:
Expand All @@ -26,9 +26,9 @@ jobs:
- name: Build Docker image
run: |
repo_name=$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')
docker build -t ghcr.io/${repo_name}/livesim2:latest .
docker build -t ghcr.io/${repo_name}/livesim2:"${{ github.ref_name }}" .
- name: Push Docker image to GitHub Container Registry
run: |
repo_name=$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')
docker push ghcr.io/${repo_name}/livesim2:latest
docker push ghcr.io/${repo_name}/livesim2:"${{ github.ref_name }}"

0 comments on commit 2b654a1

Please sign in to comment.