diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1875f19..9a76ee8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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