Skip to content

Commit

Permalink
wip: Update CD workflow to trigger on CI completion.
Browse files Browse the repository at this point in the history
- Modified workflow to trigger on CI completion.
- Added conditional step based on workflow run success and event type.
- Included source change identification step using paths filter.
  • Loading branch information
winromulus committed Jun 15, 2024
1 parent eb817f4 commit 1fbdc9d
Showing 1 changed file with 26 additions and 13 deletions.
39 changes: 26 additions & 13 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,42 @@
name: CD

on:
push:
branches:
- main
- develop
- feature/**
- release/**
- hotfix/**
paths:
- 'src/**'
- 'ES.FX.sln'
- 'Directory.Build.props'
workflow_run:
workflows: ["CI"]
types:
- completed

jobs:
deploy:
needs: build-and-test

runs-on: ubuntu-latest

if: >
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.event == 'push' &&
(github.ref == 'refs/heads/main' ||
github.ref == 'refs/heads/develop' ||
startsWith(github.ref, 'refs/heads/feature/') ||
startsWith(github.ref, 'refs/heads/release/') ||
startsWith(github.ref, 'refs/heads/hotfix/'))
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: src - identify source changes
id: source-changed-filter
uses: dorny/paths-filter@v2
with:
base: ${{ github.ref }}
filters: |
src:
- 'src/**'
solution:
- 'ES.FX.sln'
build:
- 'Directory.Build.props'
- name: build
uses: ./.github/actions/build
with:
Expand Down

0 comments on commit 1fbdc9d

Please sign in to comment.