From d747e84c551e5a1d476b80d4c155663607a9e602 Mon Sep 17 00:00:00 2001 From: Oliver Lipkau Date: Thu, 21 Dec 2023 10:37:50 +0100 Subject: [PATCH] testing `workflow_run` for CI to trigger CD --- .github/workflows/{release.yml => cd.yml} | 14 +++++++++----- .github/workflows/ci.yml | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) rename .github/workflows/{release.yml => cd.yml} (69%) diff --git a/.github/workflows/release.yml b/.github/workflows/cd.yml similarity index 69% rename from .github/workflows/release.yml rename to .github/workflows/cd.yml index be94a053..35032ecf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/cd.yml @@ -1,9 +1,11 @@ -name: Release +name: Continous Deployment on: - push: - branches: - - feature/package-artifact # TODO: what should be a trigger? + workflow_run: + workflows: ["Continous Integration"] + branches: ["main", "master", "feature/package-artifact"] + types: + - completed workflow_dispatch: defaults: @@ -18,10 +20,12 @@ jobs: - uses: actions/checkout@v4 - uses: actions/download-artifact@v4 # TODO: this file is not available, as it's an artefact from another pipeline - # https://github.com/actions/download-artifact#download-artifacts-from-other-workflow-runs-or-repositories + # https://github.com/actions/download-artifact#download-artifacts-from-other-workflow-runs-or-repositories with: name: Release path: ./Release/ + github-token: ${{ secrets.GITHUB_TOKEN }} + run-id: ${{ github.event.workflow_run.id }} - uses: actions/cache@v3 id: cacher diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c6cad18a..7611f244 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: CI +name: Continous Integration on: [pull_request]