Executing GitHub Actions jobs or steps only when specific files change

  Рет қаралды 186

Knowledge Amplifier

Knowledge Amplifier

2 ай бұрын

When you create a GitHub Action you can specify when it runs, this is called a trigger. You can specify triggers such as when new code is pushed to the repository, or when a pull request is actioned the workflow will spin into action.
Usually these triggers are set so they kick off when a change happens to a specific branch. But you can take that down another level. You can specific if a change happens to a specific directory or path within a branch then the workflow or a specific Step within a Job will kick start.
In this video we are going to explore this concept in detail.
Documentation Reference:
=======================
github.com/dorny/paths-filter
Workflow Code:
==============
name: selective_run
on:
push:
jobs:
notification:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Execution decider
uses: dorny/paths-filter@v3
id: changes
with:
filters: |
src_f1:
- 'src/function1/**'
src_f2:
- 'src/function2/**'
- name: Dummy Step1
if: steps.changes.outputs.src_f1 == 'true'
run: echo "Hello, World1!"
- name: Dummy Step2
if: steps.changes.outputs.src_f2 == 'true'
run: echo "Hello, World2!"
Check this playlist for more Data Engineering related videos:
• Demystifying Data Engi...
Apache Kafka form scratch
• Apache Kafka for Pytho...
Messaging Made Easy: AWS SQS Playlist
• Messaging Made Easy: A...
Snowflake Complete Course from scratch with End-to-End Project with in-depth explanation--
doc.clickup.com/37466271/d/h/...
Explore our vlog channel:
/ @funwithourfam
#githubactions #aws #cicd #github #workflow

Пікірлер: 1
@wattersvwatterspina
@wattersvwatterspina 25 күн бұрын
I have another GitHub workflow, which changes src/function1/main.py file and pushes into the GitHub, and in that case demoyt.yml action is not triggering. Do you know what is the reason can be? Thanks
AWS gateway many API routes to single Lambda integration using Powertools
28:58
НРАВИТСЯ ЭТОТ ФОРМАТ??
00:37
МЯТНАЯ ФАНТА
Рет қаралды 1,3 МЛН
50 YouTubers Fight For $1,000,000
41:27
MrBeast
Рет қаралды 172 МЛН
100❤️
00:19
MY💝No War🤝
Рет қаралды 23 МЛН
Now THIS is entertainment! 🤣
00:59
America's Got Talent
Рет қаралды 38 МЛН
Quickly Build high-accuracy Gen-AI applications using Amazon Kendra & LLM
20:23
GitHub Actions:  Parallel and Sequential Execution
9:02
TechRill
Рет қаралды 1 М.
SCD Type 1 Implementation in Azure Data Factory: Beginner to Expert
37:24
Amazon ElastiCache | Boost performance of MySQL using Redis
23:59
Knowledge Amplifier
Рет қаралды 395
Understanding GitHub Actions - Automated Testing
11:28
Dev Leonardo
Рет қаралды 26 М.
How to set the order of your GitHub Action jobs
5:37
Kahan Data Solutions
Рет қаралды 7 М.
Multi Job GitHub Actions Workflow Example
7:42
Cameron McKenzie
Рет қаралды 6 М.
Красиво, но телефон жаль
0:32
Бесполезные Новости
Рет қаралды 1,4 МЛН
iPhone, Galaxy или Pixel? 😎
0:16
serg1us
Рет қаралды 881 М.
iPhone 15 Pro в реальной жизни
24:07
HUDAKOV
Рет қаралды 419 М.
ГОСЗАКУПОЧНЫЙ ПК за 10 тысяч рублей
36:28
Ремонтяш
Рет қаралды 528 М.