PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, September 26, 2022

[FIXED] How to use both paths & branches filter with workflow_run event in Github Action?

 September 26, 2022     continuous-deployment, continuous-integration, github, github-actions, yaml     No comments   

Issue

I want to trigger a workflow that deploys the build. I want to make sure of the following:

  1. CI workflow is completed
  2. branch is develop
  3. there are some changes in src/**
on:
  workflow_run:
    workflows: ['CI']
    branches: [develop]
    paths: ['src/**']
    types:
      - completed

It seems the above approach is not supported 😢, is there any other way?


Solution

Considering the workflows+branches combo should work, but paths: does not exist in the workflow_run context, you might consider using actions/verify-changed-files

That way, you can trigger an intermediate workflow which would check which files have changed.
Then the next step can be run only if the previous step (file check) has succeeded (using success())



Answered By - VonC
Answer Checked By - Pedro (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing