Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .github/workflows/docker-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ name: CI and Docker release

on:
push:
pull_request:
release:
types: [published]

jobs:
unit-tests:
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -23,10 +23,8 @@ jobs:
run: pytest tests/ -q

build-and-push:
needs: unit-tests
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
if: github.event_name == 'release'
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -40,7 +38,7 @@ jobs:
with:
images: tarik56/tinyops-core
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{version}},value=${{ github.event.release.tag_name }}
type=raw,value=latest

- name: Login to Docker Hub
Expand Down
Loading