From f075b046e8973f699e3c157da930b18eb4a7710c Mon Sep 17 00:00:00 2001 From: nkanaev Date: Fri, 10 Jul 2026 19:06:07 +0100 Subject: [PATCH] ci: setup workflow chain --- .github/workflows/build-docker.yml | 8 +------- .../{build.yml => build-releases.yml} | 9 ++------- .github/workflows/ci.yml | 20 +++++++++++++++++++ .github/workflows/test.yml | 2 +- 4 files changed, 24 insertions(+), 15 deletions(-) rename .github/workflows/{build.yml => build-releases.yml} (98%) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index f840341..4d9a414 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -1,11 +1,5 @@ name: Publish Docker Image -on: - push: - tags: - - v* - branches: - - master - workflow_dispatch: +on: workflow_call env: REGISTRY: ghcr.io diff --git a/.github/workflows/build.yml b/.github/workflows/build-releases.yml similarity index 98% rename from .github/workflows/build.yml rename to .github/workflows/build-releases.yml index b84cd92..51c024f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build-releases.yml @@ -1,10 +1,5 @@ -name: Build - -on: - push: - tags: - - v* - workflow_dispatch: +name: Build Releases +on: workflow_call jobs: build_macos: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..ee28fd8 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,20 @@ +name: CI +on: + push: + workflow_dispatch: + +jobs: + test: + uses: ./.github/workflows/test.yml + + build-docker: + needs: test + if: startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master' + uses: ./.github/workflows/build-docker.yml + secrets: inherit + + build-releases: + needs: test + if: startsWith(github.ref, 'refs/tags/v') + uses: ./.github/workflows/build-releases.yml + secrets: inherit diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ba8de36..e8c0924 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,6 +1,6 @@ name: Test -on: push +on: workflow_call jobs: test: