From 1d4f10402215eca6ab44f6b1d77779bbf35e4238 Mon Sep 17 00:00:00 2001 From: Nicolas Bock Date: Wed, 10 Jul 2024 16:11:46 +0200 Subject: [PATCH] Resuable workflow Signed-off-by: Nicolas Bock --- .github/workflows/docker-publish.yaml | 2 +- .github/workflows/ghcr-publish.yaml | 5 ++++- .github/workflows/test-and-build.yaml | 5 +++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-publish.yaml b/.github/workflows/docker-publish.yaml index 069242f..dbcf007 100644 --- a/.github/workflows/docker-publish.yaml +++ b/.github/workflows/docker-publish.yaml @@ -2,7 +2,7 @@ name: Publish to Docker Hub on: workflow_run: - workflows: [Build and Test] + workflows: [Test and Build] types: - completed diff --git a/.github/workflows/ghcr-publish.yaml b/.github/workflows/ghcr-publish.yaml index 2e63da7..8ae01c0 100644 --- a/.github/workflows/ghcr-publish.yaml +++ b/.github/workflows/ghcr-publish.yaml @@ -2,7 +2,7 @@ name: Publish to ghcr.io on: workflow_run: - workflows: [Build and Test] + workflows: [Test and Build] types: - completed @@ -11,6 +11,9 @@ env: IMAGE_NAME: ${{ github.repository }} jobs: + test-and-build: + uses: ./.github/workflows/test-and-build.yaml + ghcr-publish: runs-on: ubuntu-latest permissions: diff --git a/.github/workflows/test-and-build.yaml b/.github/workflows/test-and-build.yaml index 397652a..7d639fa 100644 --- a/.github/workflows/test-and-build.yaml +++ b/.github/workflows/test-and-build.yaml @@ -1,4 +1,4 @@ -name: Build and Test +name: Test and Build on: schedule: @@ -13,9 +13,10 @@ on: branches: - main workflow_dispatch: + workflow_call: jobs: - test: + test-and-build: runs-on: ubuntu-latest steps: