Update workflow to create docker image with tags

This commit is contained in:
2025-08-06 21:04:07 +10:00
parent f48ae46e22
commit 9efc8d5950
+5 -3
View File
@@ -3,6 +3,8 @@ name: CI/CD
on:
push:
branches: [ main, develop ]
tags:
- 'v*.*.*'
pull_request:
branches: [ main ]
release:
@@ -56,7 +58,7 @@ jobs:
docker:
runs-on: ubuntu-latest
needs: test
if: github.event_name == 'push' || github.event_name == 'release'
if: github.event_name == 'push' || github.event_name == 'release' || startsWith(github.ref, 'refs/tags/v')
permissions:
contents: read
packages: write
@@ -69,7 +71,7 @@ jobs:
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
if: github.event_name == 'push' || github.event_name == 'release'
if: github.event_name == 'push' || github.event_name == 'release' || startsWith(github.ref, 'refs/tags/v')
uses: docker/login-action@v3
with:
registry: ghcr.io
@@ -100,7 +102,7 @@ jobs:
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name == 'push' || github.event_name == 'release' }}
push: ${{ github.event_name == 'push' || github.event_name == 'release' || startsWith(github.ref, 'refs/tags/v') }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha