{"id":5253,"date":"2025-07-22T17:15:59","date_gmt":"2025-07-22T17:15:59","guid":{"rendered":"https:\/\/techhub.saworks.io\/docs\/tutoriel-github\/automatisez-votre-flux-de-travail-avec-github-actions-partie-1-sur-2\/identifier-les-composants-de-github-actions\/"},"modified":"2025-07-31T13:20:10","modified_gmt":"2025-07-31T13:20:10","slug":"identifier-les-composants-de-github-actions","status":"publish","type":"docs","link":"https:\/\/techhub.saworks.io\/fr\/docs\/tutoriel-github\/automatisez-votre-flux-de-travail-avec-github-actions-partie-1-sur-2\/identifier-les-composants-de-github-actions\/","title":{"rendered":"Identifier les composants de GitHub Actions"},"content":{"rendered":"\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<p>Dans cette section, vous allez d\u00e9couvrir les&nbsp;<strong>composants de base<\/strong>&nbsp;d\u2019un fichier de workflow GitHub Actions.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Les composants de GitHub Actions<\/strong><\/h3>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"633\" height=\"328\" data-src=\"https:\/\/techhub.saworks.io\/wp-content\/uploads\/2025\/07\/github-actions-workflow-components.png\" alt=\"\" class=\"wp-image-5257 lazyload\" data-srcset=\"https:\/\/techhub.saworks.io\/wp-content\/uploads\/2025\/07\/github-actions-workflow-components.png 633w, https:\/\/techhub.saworks.io\/wp-content\/uploads\/2025\/07\/github-actions-workflow-components-300x155.png 300w\" data-sizes=\"(max-width: 633px) 100vw, 633px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 633px; --smush-placeholder-aspect-ratio: 633\/328;\" \/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Il existe plusieurs composants qui travaillent ensemble pour ex\u00e9cuter des t\u00e2ches ou des jobs dans un workflow GitHub Actions.<br>En r\u00e9sum\u00e9 :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Un \u00e9v\u00e9nement<\/strong>&nbsp;d\u00e9clenche le workflow,<\/li>\n\n\n\n<li>qui contient un ou plusieurs&nbsp;<strong>jobs<\/strong>,<\/li>\n\n\n\n<li>lesquels utilisent des&nbsp;<strong>\u00e9tapes (steps)<\/strong>&nbsp;pour d\u00e9finir quelles&nbsp;<strong>actions<\/strong>&nbsp;seront ex\u00e9cut\u00e9es.<\/li>\n<\/ul>\n\n\n\n<p>Pour mieux comprendre comment ces composants interagissent, examinons-les un par un :<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Flux de travail<\/strong><\/h3>\n\n\n\n<p>Un&nbsp;<strong>Flux de travail<\/strong>&nbsp;est un processus automatis\u00e9 que vous ajoutez \u00e0 votre d\u00e9p\u00f4t.<br>Il doit contenir au moins un&nbsp;<strong>job<\/strong>, et peut \u00eatre d\u00e9clench\u00e9 par diff\u00e9rents \u00e9v\u00e9nements.<br>Vous pouvez l\u2019utiliser pour&nbsp;<strong>compiler, tester, empaqueter, publier ou d\u00e9ployer<\/strong>&nbsp;le projet de votre d\u00e9p\u00f4t sur GitHub.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Jobs<\/strong><\/h3>\n\n\n\n<p>Un&nbsp;<strong>job<\/strong>&nbsp;est le premier composant majeur d\u2019un workflow.<br>C\u2019est une section du workflow associ\u00e9e \u00e0 un&nbsp;<strong>runner<\/strong>&nbsp;(ex\u00e9cuteur).<br>Ce runner peut \u00eatre&nbsp;<strong>h\u00e9berg\u00e9 par GitHub<\/strong>&nbsp;ou&nbsp;<strong>auto-h\u00e9berg\u00e9<\/strong>, et le job peut s\u2019ex\u00e9cuter sur une machine ou dans un conteneur.<\/p>\n\n\n\n<p>Vous sp\u00e9cifiez le runner avec l\u2019attribut&nbsp;<code>runs-on<\/code>.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u00c9tapes (Steps)<\/strong><\/h3>\n\n\n\n<p>Une&nbsp;<strong>\u00e9tape<\/strong>&nbsp;est une t\u00e2che individuelle qui peut ex\u00e9cuter des commandes dans un job.<br>Dans notre exemple pr\u00e9c\u00e9dent, l\u2019\u00e9tape utilise l\u2019action&nbsp;<code>actions\/checkout@v2<\/code>&nbsp;pour effectuer un&nbsp;<strong>checkout<\/strong>&nbsp;du d\u00e9p\u00f4t.<br>Ce qui est int\u00e9ressant, c\u2019est la valeur&nbsp;<code>uses: .\/action-a<\/code>.<br>Il s\u2019agit du&nbsp;<strong>chemin vers l\u2019action conteneuris\u00e9e<\/strong>&nbsp;que vous allez cr\u00e9er dans un fichier&nbsp;<code>action.yml<\/code>.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Actions<\/strong><\/h3>\n\n\n\n<p>Les&nbsp;<strong>actions<\/strong>&nbsp;dans votre workflow sont des&nbsp;<strong>commandes autonomes<\/strong>&nbsp;qui sont ex\u00e9cut\u00e9es.<br>Ces commandes peuvent faire r\u00e9f\u00e9rence \u00e0 :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>des&nbsp;<strong>actions GitHub<\/strong>,<\/li>\n\n\n\n<li>vos&nbsp;<strong>propres actions personnalis\u00e9es<\/strong>,<\/li>\n\n\n\n<li>ou des&nbsp;<strong>actions communautaires<\/strong>, comme celle utilis\u00e9e dans l\u2019exemple pr\u00e9c\u00e9dent :&nbsp;<code>actions\/checkout@v2<\/code>.<\/li>\n<\/ul>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Dans cette section, vous allez d\u00e9couvrir les&nbsp;composants de base&nbsp;d\u2019un fichier de workflow GitHub Actions. Les composants de GitHub Actions Il existe plusieurs composants [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":5238,"menu_order":4,"comment_status":"closed","ping_status":"closed","template":"","doc_tag":[],"doc_badge":[],"class_list":["post-5253","docs","type-docs","status-publish","hentry"],"author_avatar":"https:\/\/secure.gravatar.com\/avatar\/6a70e7c73db9f245e650948d09d74f61?s=96&d=mm&r=g","author_name":"Annick N'dri","_links":{"self":[{"href":"https:\/\/techhub.saworks.io\/fr\/wp-json\/wp\/v2\/docs\/5253"}],"collection":[{"href":"https:\/\/techhub.saworks.io\/fr\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/techhub.saworks.io\/fr\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/techhub.saworks.io\/fr\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/techhub.saworks.io\/fr\/wp-json\/wp\/v2\/comments?post=5253"}],"version-history":[{"count":0,"href":"https:\/\/techhub.saworks.io\/fr\/wp-json\/wp\/v2\/docs\/5253\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/techhub.saworks.io\/fr\/wp-json\/wp\/v2\/docs\/5238"}],"wp:attachment":[{"href":"https:\/\/techhub.saworks.io\/fr\/wp-json\/wp\/v2\/media?parent=5253"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/techhub.saworks.io\/fr\/wp-json\/wp\/v2\/doc_tag?post=5253"},{"taxonomy":"doc_badge","embeddable":true,"href":"https:\/\/techhub.saworks.io\/fr\/wp-json\/wp\/v2\/doc_badge?post=5253"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}