{"id":5260,"date":"2025-07-23T09:10:25","date_gmt":"2025-07-23T09:10:25","guid":{"rendered":"https:\/\/techhub.saworks.io\/docs\/tutoriel-github\/automatisez-votre-flux-de-travail-avec-github-actions-partie-1-sur-2\/configurer-un-workflow-github-actions\/"},"modified":"2025-07-31T13:38:12","modified_gmt":"2025-07-31T13:38:12","slug":"configurer-un-workflow-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\/configurer-un-workflow-github-actions\/","title":{"rendered":"Configurer un workflow GitHub Actions"},"content":{"rendered":"\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<p>Ici, vous d\u00e9couvrez quelques configurations courantes dans un fichier de workflow. Vous explorez \u00e9galement les cat\u00e9gories de types d&rsquo;\u00e9v\u00e9nements, la d\u00e9sactivation et la suppression des workflows, ainsi que l&rsquo;utilisation de versions sp\u00e9cifiques d&rsquo;une action pour respecter les bonnes pratiques de s\u00e9curit\u00e9.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Configurer les workflows pour s&rsquo;ex\u00e9cuter lors d&rsquo;\u00e9v\u00e9nements planifi\u00e9s<\/strong><\/h2>\n\n\n\n<p><br>Comme mentionn\u00e9 pr\u00e9c\u00e9demment, vous pouvez configurer vos workflows pour qu&rsquo;ils s&rsquo;ex\u00e9cutent lorsqu&rsquo;une activit\u00e9 sp\u00e9cifique se produit sur GitHub, lorsqu&rsquo;un \u00e9v\u00e9nement externe \u00e0 GitHub survient, ou \u00e0 un moment planifi\u00e9. L&rsquo;\u00e9v\u00e9nement de planification vous permet de d\u00e9clencher un workflow \u00e0 des heures UTC sp\u00e9cifiques en utilisant la syntaxe <a href=\"https:\/\/pubs.opengroup.org\/onlinepubs\/9699919799\/utilities\/crontab.html#tag_20_25_07\">cron POSIX<\/a>. Cette syntaxe cron comporte cinq champs repr\u00e9sent\u00e9s par des ast\u00e9risques (*), et chaque champ correspond \u00e0 une unit\u00e9 de temps.<\/p>\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=\"907\" height=\"277\" data-src=\"https:\/\/techhub.saworks.io\/wp-content\/uploads\/2025\/07\/image-46.png\" alt=\"\" class=\"wp-image-5263 lazyload\" data-srcset=\"https:\/\/techhub.saworks.io\/wp-content\/uploads\/2025\/07\/image-46.png 907w, https:\/\/techhub.saworks.io\/wp-content\/uploads\/2025\/07\/image-46-300x92.png 300w, https:\/\/techhub.saworks.io\/wp-content\/uploads\/2025\/07\/image-46-768x235.png 768w\" data-sizes=\"(max-width: 907px) 100vw, 907px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 907px; --smush-placeholder-aspect-ratio: 907\/277;\" \/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Par exemple, si vous souhaitez ex\u00e9cuter un workflow toutes les 15 minutes, l&rsquo;\u00e9v\u00e9nement de planification ressemblerait \u00e0 l&rsquo;exemple suivant :<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#EEFFFF;--cbp-line-number-width:calc(1 * 0.6 * .75rem);line-height:1rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#212121\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>on:\n  schedule:\n    - cron:  '*\/15 * * * *'<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-darker\" style=\"background-color: #212121\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #FFCB6B\">on:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  <\/span><span style=\"color: #FFCB6B\">schedule:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #FFCB6B\">-<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">cron:<\/span><span style=\"color: #EEFFFF\">  <\/span><span style=\"color: #89DDFF\">&#39;<\/span><span style=\"color: #C3E88D\">*\/15 * * * *<\/span><span style=\"color: #89DDFF\">&#39;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Et si vous souhaitez ex\u00e9cuter un workflow tous les dimanches \u00e0 3h00 du matin, l&rsquo;\u00e9v\u00e9nement de planification ressemblerait \u00e0 ceci :<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#EEFFFF;--cbp-line-number-width:calc(1 * 0.6 * .75rem);line-height:1rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#212121\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>on:\n  schedule:\n    - cron:  '0 3 * * SUN'<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-darker\" style=\"background-color: #212121\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #FFCB6B\">on:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  <\/span><span style=\"color: #FFCB6B\">schedule:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #FFCB6B\">-<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">cron:<\/span><span style=\"color: #EEFFFF\">  <\/span><span style=\"color: #89DDFF\">&#39;<\/span><span style=\"color: #C3E88D\">0 3 * * SUN<\/span><span style=\"color: #89DDFF\">&#39;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Vous pouvez \u00e9galement utiliser des op\u00e9rateurs pour sp\u00e9cifier une plage de valeurs ou affiner l&rsquo;ex\u00e9cution planifi\u00e9e de votre workflow. L&rsquo;intervalle le plus court pour ex\u00e9cuter des workflows planifi\u00e9s est toutes les cinq minutes, et ils s&rsquo;ex\u00e9cutent sur le dernier commit de la branche par d\u00e9faut ou de base.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Configurer les workflows pour s&rsquo;ex\u00e9cuter manuellement<\/strong><\/h2>\n\n\n\n<p><strong><br><\/strong>En plus des \u00e9v\u00e9nements planifi\u00e9s, vous pouvez d\u00e9clencher manuellement un workflow en utilisant l&rsquo;\u00e9v\u00e9nement&nbsp;<code>workflow_dispatch<\/code>. Cet \u00e9v\u00e9nement vous permet d&rsquo;ex\u00e9cuter le workflow via l&rsquo;API REST de GitHub ou en s\u00e9lectionnant le bouton&nbsp;<strong>Run workflow<\/strong>&nbsp;dans l&rsquo;onglet&nbsp;<strong>Actions<\/strong>&nbsp;de votre d\u00e9p\u00f4t sur GitHub. Gr\u00e2ce \u00e0&nbsp;<code>workflow_dispatch<\/code>, vous pouvez choisir sur quelle branche ex\u00e9cuter le workflow et d\u00e9finir des entr\u00e9es facultatives que GitHub pr\u00e9sente sous forme de champs dans l&rsquo;interface utilisateur.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#EEFFFF;--cbp-line-number-width:calc(1 * 0.6 * .75rem);line-height:1rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#212121\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>on:\n  workflow_dispatch:\n    inputs:\n      logLevel:\n        description: 'Log level'     \n        required: true\n        default: 'warning'\n      tags:\n        description: 'Test scenario tags'<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-darker\" style=\"background-color: #212121\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #FFCB6B\">on:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  <\/span><span style=\"color: #FFCB6B\">workflow_dispatch:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #FFCB6B\">inputs:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">      <\/span><span style=\"color: #FFCB6B\">logLevel:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">        <\/span><span style=\"color: #FFCB6B\">description:<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">&#39;<\/span><span style=\"color: #C3E88D\">Log level<\/span><span style=\"color: #89DDFF\">&#39;<\/span><span style=\"color: #EEFFFF\">     <\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">        <\/span><span style=\"color: #FFCB6B\">required:<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">true<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">        <\/span><span style=\"color: #FFCB6B\">default:<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">&#39;<\/span><span style=\"color: #C3E88D\">warning<\/span><span style=\"color: #89DDFF\">&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">      <\/span><span style=\"color: #FFCB6B\">tags:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">        <\/span><span style=\"color: #FFCB6B\">description:<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">&#39;<\/span><span style=\"color: #C3E88D\">Test scenario tags<\/span><span style=\"color: #89DDFF\">&#39;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>En plus de&nbsp;<code>workflow_dispatch<\/code>, vous pouvez utiliser l&rsquo;API GitHub pour d\u00e9clencher un \u00e9v\u00e9nement webhook appel\u00e9&nbsp;<code>repository_dispatch<\/code>. Cet \u00e9v\u00e9nement vous permet de d\u00e9clencher un workflow pour une activit\u00e9 qui se produit en dehors de GitHub. Il fonctionne essentiellement comme une requ\u00eate HTTP envoy\u00e9e \u00e0 votre d\u00e9p\u00f4t, demandant \u00e0 GitHub de lancer un workflow \u00e0 partir d&rsquo;une action ou d&rsquo;un webhook.<\/p>\n\n\n\n<p>L&rsquo;utilisation de cet \u00e9v\u00e9nement manuel n\u00e9cessite deux \u00e9tapes :<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Envoyer une requ\u00eate POST au point de terminaison GitHub&nbsp;<code>\/repos\/{owner}\/{repo}\/dispatches<\/code>&nbsp;avec les noms d&rsquo;\u00e9v\u00e9nements webhook dans le corps de la requ\u00eate.<\/li>\n\n\n\n<li>Configurer votre workflow pour utiliser l&rsquo;\u00e9v\u00e9nement&nbsp;<code>repository_dispatch<\/code>.<\/li>\n<\/ol>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#EEFFFF;--cbp-line-number-width:calc(1 * 0.6 * .75rem);line-height:1rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#212121\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>curl \\\n  -X POST \\\n  -H \"Accept: application\/vnd.github.v3+json\" \\\n  https:\/\/api.github.com\/repos\/octocat\/hello-world\/dispatches \\\n  -d '{\"event_type\":\"event_type\"}'<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-darker\" style=\"background-color: #212121\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #FFCB6B\">curl<\/span><span style=\"color: #EEFFFF\"> \\<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  <\/span><span style=\"color: #C3E88D\">-X<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">POST<\/span><span style=\"color: #EEFFFF\"> \\<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  <\/span><span style=\"color: #C3E88D\">-H<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">Accept: application\/vnd.github.v3+json<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #EEFFFF\"> \\<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  <\/span><span style=\"color: #C3E88D\">https:\/\/api.github.com\/repos\/octocat\/hello-world\/dispatches<\/span><span style=\"color: #EEFFFF\"> \\<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  <\/span><span style=\"color: #C3E88D\">-d<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">&#39;<\/span><span style=\"color: #C3E88D\">{&quot;event_type&quot;:&quot;event_type&quot;}<\/span><span style=\"color: #89DDFF\">&#39;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#EEFFFF;--cbp-line-number-width:calc(1 * 0.6 * .75rem);line-height:1rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#212121\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>on:\n  repository_dispatch:\n    types: &#91;opened, deleted&#93;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-darker\" style=\"background-color: #212121\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #FFCB6B\">on:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  <\/span><span style=\"color: #FFCB6B\">repository_dispatch:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #FFCB6B\">types:<\/span><span style=\"color: #EEFFFF\"> &#91;opened, <\/span><span style=\"color: #C3E88D\">deleted&#93;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Configurer les workflows pour s&rsquo;ex\u00e9cuter lors d&rsquo;\u00e9v\u00e9nements webhook<\/strong><\/h2>\n\n\n\n<p><br>Enfin, vous pouvez configurer un workflow pour qu\u2019il s\u2019ex\u00e9cute lorsque des \u00e9v\u00e9nements webhook sp\u00e9cifiques se produisent sur GitHub. La plupart des \u00e9v\u00e9nements webhook peuvent \u00eatre d\u00e9clench\u00e9s par plusieurs types d\u2019activit\u00e9s. Si plusieurs activit\u00e9s existent pour un webhook, vous pouvez sp\u00e9cifier un type d\u2019activit\u00e9 pour d\u00e9clencher le workflow.<br>Par exemple, vous pouvez ex\u00e9cuter un workflow pour l\u2019\u00e9v\u00e9nement&nbsp;<code>check_run<\/code>, mais uniquement pour les types d\u2019activit\u00e9s&nbsp;<code>rerequested<\/code>&nbsp;ou&nbsp;<code>requested_action<\/code>.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#EEFFFF;--cbp-line-number-width:calc(1 * 0.6 * .75rem);line-height:1rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#212121\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>on:\n  check_run:\n    types: &#91;rerequested, requested_action&#93;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-darker\" style=\"background-color: #212121\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #FFCB6B\">on:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  <\/span><span style=\"color: #FFCB6B\">check_run:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #FFCB6B\">types:<\/span><span style=\"color: #EEFFFF\"> &#91;rerequested, <\/span><span style=\"color: #C3E88D\">requested_action&#93;<\/span><\/span><\/code><\/pre><\/div>\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>Repository_dispatch<\/strong><\/h3>\n\n\n\n<p><code>repository_dispatch<\/code>&nbsp;est un \u00e9v\u00e9nement personnalis\u00e9 dans GitHub Actions qui permet \u00e0 des syst\u00e8mes externes (ou m\u00eame \u00e0 d&rsquo;autres workflows GitHub) de d\u00e9clencher manuellement des workflows en envoyant une requ\u00eate POST \u00e0 l&rsquo;API GitHub. Cela permet une automatisation flexible et une int\u00e9gration avec des outils, scripts ou syst\u00e8mes externes qui doivent d\u00e9marrer des workflows dans votre d\u00e9p\u00f4t.<\/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>Cas d&rsquo;utilisation<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>D\u00e9clencher des workflows \u00e0 partir d\u2019outils CI\/CD externes.<\/li>\n\n\n\n<li>Coordonner des d\u00e9ploiements multi-d\u00e9p\u00f4ts (par exemple, le d\u00e9p\u00f4t A termine une compilation \u2192 d\u00e9clenche le d\u00e9p\u00f4t B).<\/li>\n\n\n\n<li>Lancer une automatisation bas\u00e9e sur des \u00e9v\u00e9nements externes (webhooks, alertes de surveillance, t\u00e2ches CRON en dehors de GitHub).<\/li>\n\n\n\n<li>Encha\u00eener l\u2019ex\u00e9cution de workflows entre plusieurs d\u00e9p\u00f4ts ou \u00e0 l\u2019int\u00e9rieur de monorepos.<\/li>\n<\/ul>\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>Exemple de workflow \u00e9coutant&nbsp;<code>repository_dispatch<\/code><\/strong><\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#EEFFFF;--cbp-line-number-width:calc(2 * 0.6 * .75rem);line-height:1rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#212121\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>name: Custom Dispatch Listener\n\non:\n  repository_dispatch:\n    types: &#91;run-tests, deploy-to-prod&#93;  # Optional filtering\n\njobs:\n  run:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Echo the payload\n        run: |\n          echo \"Event type: ${{ github.event.action }}\"\n          echo \"Payload value: ${{ github.event.client_payload.env }}\"<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-darker\" style=\"background-color: #212121\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #FFCB6B\">name:<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">Custom<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">Dispatch<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">Listener<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #FFCB6B\">on:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  <\/span><span style=\"color: #FFCB6B\">repository_dispatch:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #FFCB6B\">types:<\/span><span style=\"color: #EEFFFF\"> &#91;run-tests, <\/span><span style=\"color: #C3E88D\">deploy-to-prod&#93;<\/span><span style=\"color: #EEFFFF\">  <\/span><span style=\"color: #545454; font-style: italic\"># Optional filtering<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #82AAFF\">jobs<\/span><span style=\"color: #EEFFFF\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  <\/span><span style=\"color: #FFCB6B\">run:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #FFCB6B\">runs-on:<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">ubuntu-latest<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #FFCB6B\">steps:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">      <\/span><span style=\"color: #FFCB6B\">-<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">name:<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">Echo<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">the<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">payload<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">        <\/span><span style=\"color: #FFCB6B\">run:<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">|<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">          <\/span><span style=\"color: #82AAFF\">echo<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">Event type: <\/span><span style=\"color: #89DDFF\">${<\/span><span style=\"color: #C3E88D\">{ <\/span><span style=\"color: #EEFFFF\">github<\/span><span style=\"color: #C3E88D\">.<\/span><span style=\"color: #EEFFFF\">event<\/span><span style=\"color: #C3E88D\">.<\/span><span style=\"color: #EEFFFF\">action<\/span><span style=\"color: #C3E88D\"> <\/span><span style=\"color: #89DDFF\">}<\/span><span style=\"color: #C3E88D\">}<\/span><span style=\"color: #89DDFF\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">          <\/span><span style=\"color: #82AAFF\">echo<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">Payload value: <\/span><span style=\"color: #89DDFF\">${<\/span><span style=\"color: #C3E88D\">{ <\/span><span style=\"color: #EEFFFF\">github<\/span><span style=\"color: #C3E88D\">.<\/span><span style=\"color: #EEFFFF\">event<\/span><span style=\"color: #C3E88D\">.<\/span><span style=\"color: #EEFFFF\">client_payload<\/span><span style=\"color: #C3E88D\">.<\/span><span style=\"color: #EEFFFF\">env<\/span><span style=\"color: #C3E88D\"> <\/span><span style=\"color: #89DDFF\">}<\/span><span style=\"color: #C3E88D\">}<\/span><span style=\"color: #89DDFF\">&quot;<\/span><\/span><\/code><\/pre><\/div>\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>\u00c9l\u00e9ments cl\u00e9s :<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>types<\/code><\/strong>&nbsp;:&nbsp;<em>Optionnel.<\/em>&nbsp;D\u00e9finit des types d\u2019\u00e9v\u00e9nements personnalis\u00e9s comme&nbsp;<code>run-tests<\/code>,&nbsp;<code>deploy-to-prod<\/code>, etc.<\/li>\n\n\n\n<li><strong><code>github.event.client_payload<\/code><\/strong>&nbsp;: Permet d\u2019acc\u00e9der \u00e0 d\u2019autres donn\u00e9es personnalis\u00e9es transmises dans l\u2019\u00e9v\u00e9nement&nbsp;<code>dispatch<\/code>.<\/li>\n\n\n\n<li><strong><code>github.event.action<\/code><\/strong>&nbsp;: Nom du&nbsp;<code>event_type<\/code>&nbsp;envoy\u00e9.<\/li>\n<\/ul>\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>D\u00e9clenchement de l\u2019\u00e9v\u00e9nement via l\u2019API<\/strong><\/h3>\n\n\n\n<p>Vous devez envoyer une requ\u00eate&nbsp;<strong>POST<\/strong>&nbsp;au point de terminaison de l\u2019API REST GitHub v3 suivant :<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#EEFFFF;--cbp-line-number-width:calc(1 * 0.6 * .75rem);line-height:1rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#212121\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>POST https:\/\/api.github.com\/repos\/OWNER\/REPO\/dispatches<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-darker\" style=\"background-color: #212121\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #FFCB6B\">POST<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">https:\/\/api.github.com\/repos\/OWNER\/REPO\/dispatches<\/span><\/span><\/code><\/pre><\/div>\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>Autorisation<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>N\u00e9cessite un&nbsp;<strong>jeton d&rsquo;acc\u00e8s personnel (PAT)<\/strong>&nbsp;avec l&rsquo;autorisation&nbsp;<code>repo<\/code>.<\/li>\n\n\n\n<li>Pour les organisations, assurez-vous que les param\u00e8tres d&rsquo;acc\u00e8s de votre jeton sont correctement configur\u00e9s.<\/li>\n<\/ul>\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>Structure d&rsquo;une commande exemple<\/strong><\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#EEFFFF;--cbp-line-number-width:calc(1 * 0.6 * .75rem);line-height:1rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#212121\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>curl -X POST \\\n  -H \"Accept: application\/vnd.github+json\" \\\n  -H \"Authorization: token YOUR_GITHUB_TOKEN\" \\\n  https:\/\/api.github.com\/repos\/OWNER\/REPO\/dispatches \\\n  -d '{\"event_type\":\"run-tests\",\"client_payload\":{\"env\":\"staging\"}}'<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-darker\" style=\"background-color: #212121\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #FFCB6B\">curl<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">-X<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">POST<\/span><span style=\"color: #EEFFFF\"> \\<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  <\/span><span style=\"color: #C3E88D\">-H<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">Accept: application\/vnd.github+json<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #EEFFFF\"> \\<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  <\/span><span style=\"color: #C3E88D\">-H<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">Authorization: token YOUR_GITHUB_TOKEN<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #EEFFFF\"> \\<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  <\/span><span style=\"color: #C3E88D\">https:\/\/api.github.com\/repos\/OWNER\/REPO\/dispatches<\/span><span style=\"color: #EEFFFF\"> \\<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  <\/span><span style=\"color: #C3E88D\">-d<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">&#39;<\/span><span style=\"color: #C3E88D\">{&quot;event_type&quot;:&quot;run-tests&quot;,&quot;client_payload&quot;:{&quot;env&quot;:&quot;staging&quot;}}<\/span><span style=\"color: #89DDFF\">&#39;<\/span><\/span><\/code><\/pre><\/div>\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>Structure du contenu (Payload)<\/strong><\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#EEFFFF;--cbp-line-number-width:calc(1 * 0.6 * .75rem);line-height:1rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#212121\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>{\n  \"event_type\": \"run-tests\",\n  \"client_payload\": {\n    \"env\": \"staging\"\n  }\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-darker\" style=\"background-color: #212121\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #89DDFF\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  <\/span><span style=\"color: #FFCB6B\">&quot;event_type&quot;<\/span><span style=\"color: #82AAFF\">:<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">run-tests<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  <\/span><span style=\"color: #FFCB6B\">&quot;client_payload&quot;<\/span><span style=\"color: #82AAFF\">:<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #FFCB6B\">&quot;env&quot;<\/span><span style=\"color: #82AAFF\">:<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">staging<\/span><span style=\"color: #89DDFF\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  <\/span><span style=\"color: #89DDFF\">}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p><strong>Param\u00e8tres<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Champ<\/th><th>Type<\/th><th>Description<\/th><th>Obligatoire<\/th><\/tr><\/thead><tbody><tr><td><code>event_type<\/code><\/td><td>string<\/td><td>Un nom personnalis\u00e9 pour l\u2019\u00e9v\u00e9nement. Ce nom correspond \u00e0 la valeur <code>types<\/code> dans le d\u00e9clencheur du workflow.<\/td><td>Oui<\/td><\/tr><tr><td><code>client_payload<\/code><\/td><td>object<\/td><td>Un contenu JSON arbitraire pour envoyer des donn\u00e9es personnalis\u00e9es au workflow (<code>github.event.client_payload<\/code>).<\/td><td>Non<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>D\u00e9tails des param\u00e8tres de&nbsp;<code>repository_dispatch<\/code><\/strong><\/h3>\n\n\n\n<p>Lorsque vous effectuez une requ\u00eate&nbsp;<strong>POST<\/strong>&nbsp;vers le point de terminaison de l\u2019API GitHub, vous devez transmettre un corps JSON contenant deux param\u00e8tres principaux :<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong><code>event_type<\/code><\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Type<\/strong>&nbsp;: cha\u00eene de caract\u00e8res (<code>string<\/code>)<\/li>\n\n\n\n<li><strong>Obligatoire<\/strong>&nbsp;: Oui<\/li>\n\n\n\n<li><strong>Description<\/strong>&nbsp;: Une cha\u00eene personnalis\u00e9e que vous d\u00e9finissez. GitHub consid\u00e8re cette valeur comme l\u2019\u00ab action \u00bb ou le \u00ab type \u00bb du dispatch. Elle est utilis\u00e9e pour identifier ce qui a d\u00e9clench\u00e9 le workflow et pour filtrer les workflows qui \u00e9coutent des types sp\u00e9cifiques.<\/li>\n\n\n\n<li><strong>Exemples<\/strong>&nbsp;:&nbsp;<code>\"deploy\"<\/code>,&nbsp;<code>\"run-tests\"<\/code>,&nbsp;<code>\"sync-db\"<\/code>,&nbsp;<code>\"build-docker\"<\/code><\/li>\n\n\n\n<li><strong>Utilisation dans le workflow<\/strong>&nbsp;: Permet d\u2019\u00e9couter des types d\u2019\u00e9v\u00e9nements sp\u00e9cifiques et d\u2019acc\u00e9der \u00e0 cette valeur dans le workflow. Cela facilite la r\u00e9utilisation d\u2019un m\u00eame workflow pour plusieurs objectifs et rend l\u2019automatisation plus organis\u00e9e et orient\u00e9e \u00e9v\u00e9nement.<\/li>\n<\/ul>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#EEFFFF;--cbp-line-number-width:calc(1 * 0.6 * .75rem);line-height:1rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#212121\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>- name: Print event type\n  run: echo \"Event type: ${{ github.event.action }}\"<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-darker\" style=\"background-color: #212121\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #FFCB6B\">-<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">name:<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">Print<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">event<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">type<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  <\/span><span style=\"color: #FFCB6B\">run:<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">echo<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">Event type: <\/span><span style=\"color: #89DDFF\">${<\/span><span style=\"color: #C3E88D\">{ <\/span><span style=\"color: #EEFFFF\">github<\/span><span style=\"color: #C3E88D\">.<\/span><span style=\"color: #EEFFFF\">event<\/span><span style=\"color: #C3E88D\">.<\/span><span style=\"color: #EEFFFF\">action<\/span><span style=\"color: #C3E88D\"> <\/span><span style=\"color: #89DDFF\">}<\/span><span style=\"color: #C3E88D\">}<\/span><span style=\"color: #89DDFF\">&quot;<\/span><\/span><\/code><\/pre><\/div>\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><code>client_payload<\/code><\/strong><\/h3>\n\n\n\n<p>Un objet JSON librement structur\u00e9 qui vous permet d\u2019envoyer des donn\u00e9es personnalis\u00e9es avec l\u2019\u00e9v\u00e9nement&nbsp;<code>dispatch<\/code>. Vous d\u00e9finissez sa structure, et il est accessible \u00e0 l\u2019int\u00e9rieur du workflow.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Format<\/strong>&nbsp;:\n<ul class=\"wp-block-list\">\n<li><strong>Type<\/strong>&nbsp;: objet (<code>object<\/code>)<\/li>\n\n\n\n<li><strong>Cl\u00e9s et valeurs personnalis\u00e9es<\/strong><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Utilisation dans le workflow<\/strong>&nbsp;:<br>Cet objet est utilis\u00e9 pour :\n<ul class=\"wp-block-list\">\n<li>des d\u00e9ploiements multi-environnements,<\/li>\n\n\n\n<li>des versions versionn\u00e9es,<\/li>\n\n\n\n<li>ou pour transmettre un contexte depuis un autre syst\u00e8me ou pipeline.<br>Il permet de cr\u00e9er des workflows param\u00e9tr\u00e9s, similaires \u00e0 l\u2019utilisation d\u2019arguments d\u2019entr\u00e9e.<\/li>\n\n\n\n<li>Exemple:<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#EEFFFF;--cbp-line-number-width:calc(1 * 0.6 * .75rem);line-height:1rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#212121\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>- name: Show payload values\n  run: |\n    echo \"Environment: ${{ github.event.client_payload.env }}\"\n    echo \"Version: ${{ github.event.client_payload.version }}\"<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-darker\" style=\"background-color: #212121\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #FFCB6B\">-<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">name:<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">Show<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">payload<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">values<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  <\/span><span style=\"color: #FFCB6B\">run:<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">|<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #82AAFF\">echo<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">Environment: <\/span><span style=\"color: #89DDFF\">${<\/span><span style=\"color: #C3E88D\">{ <\/span><span style=\"color: #EEFFFF\">github<\/span><span style=\"color: #C3E88D\">.<\/span><span style=\"color: #EEFFFF\">event<\/span><span style=\"color: #C3E88D\">.<\/span><span style=\"color: #EEFFFF\">client_payload<\/span><span style=\"color: #C3E88D\">.<\/span><span style=\"color: #EEFFFF\">env<\/span><span style=\"color: #C3E88D\"> <\/span><span style=\"color: #89DDFF\">}<\/span><span style=\"color: #C3E88D\">}<\/span><span style=\"color: #89DDFF\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #82AAFF\">echo<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">Version: <\/span><span style=\"color: #89DDFF\">${<\/span><span style=\"color: #C3E88D\">{ <\/span><span style=\"color: #EEFFFF\">github<\/span><span style=\"color: #C3E88D\">.<\/span><span style=\"color: #EEFFFF\">event<\/span><span style=\"color: #C3E88D\">.<\/span><span style=\"color: #EEFFFF\">client_payload<\/span><span style=\"color: #C3E88D\">.<\/span><span style=\"color: #EEFFFF\">version<\/span><span style=\"color: #C3E88D\"> <\/span><span style=\"color: #89DDFF\">}<\/span><span style=\"color: #C3E88D\">}<\/span><span style=\"color: #89DDFF\">&quot;<\/span><\/span><\/code><\/pre><\/div>\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>D\u00e9composition d\u2019un exemple de payload<\/strong><br><\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#EEFFFF;--cbp-line-number-width:calc(1 * 0.6 * .75rem);line-height:1rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#212121\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>{\n  \"event_type\": \"deploy-to-prod\",\n  \"client_payload\": {\n    \"env\": \"production\",\n    \"build_id\": \"build-456\",\n    \"initiator\": \"admin_user\",\n    \"services\": &#91;\"web\", \"api\", \"worker\"&#93;\n  }\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-darker\" style=\"background-color: #212121\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #89DDFF\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  <\/span><span style=\"color: #FFCB6B\">&quot;event_type&quot;<\/span><span style=\"color: #82AAFF\">:<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">deploy-to-prod<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  <\/span><span style=\"color: #FFCB6B\">&quot;client_payload&quot;<\/span><span style=\"color: #82AAFF\">:<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #FFCB6B\">&quot;env&quot;<\/span><span style=\"color: #82AAFF\">:<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">production<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #FFCB6B\">&quot;build_id&quot;<\/span><span style=\"color: #82AAFF\">:<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">build-456<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #FFCB6B\">&quot;initiator&quot;<\/span><span style=\"color: #82AAFF\">:<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">admin_user<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #FFCB6B\">&quot;services&quot;<\/span><span style=\"color: #82AAFF\">:<\/span><span style=\"color: #EEFFFF\"> &#91;<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">web<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #EEFFFF\">, <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">api<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">,<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">worker<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">&#93;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  <\/span><span style=\"color: #89DDFF\">}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">}<\/span><\/span><\/code><\/pre><\/div>\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>Utiliser des mots-cl\u00e9s conditionnels<\/strong><\/h3>\n\n\n\n<p>Dans votre fichier de workflow, vous pouvez acc\u00e9der aux informations de contexte et \u00e9valuer des expressions. Bien que les expressions soient couramment utilis\u00e9es avec le mot-cl\u00e9 conditionnel&nbsp;<code>if<\/code>&nbsp;dans un fichier de workflow pour d\u00e9terminer si une \u00e9tape doit s\u2019ex\u00e9cuter ou non, vous pouvez utiliser n\u2019importe quel contexte et expression pris en charge pour cr\u00e9er une condition.<\/p>\n\n\n\n<p>Il est important de savoir que lorsque vous utilisez des conditions dans votre workflow, vous devez utiliser la syntaxe sp\u00e9cifique :<br><strong><code>${{ &lt;expression&gt; }}<\/code><\/strong><br>Cette syntaxe indique \u00e0 GitHub qu\u2019il faut \u00e9valuer une expression plut\u00f4t que de la traiter comme une simple cha\u00eene de caract\u00e8res.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Exemple :<\/strong><\/h3>\n\n\n\n<p>Un workflow qui utilise la condition&nbsp;<code>if<\/code>&nbsp;pour v\u00e9rifier si&nbsp;<code>github.ref<\/code>&nbsp;(la branche ou l\u2019\u00e9tiquette qui a d\u00e9clench\u00e9 l\u2019ex\u00e9cution du workflow) correspond \u00e0&nbsp;<code>refs\/heads\/main<\/code>.<br>Pour que le workflow continue, il ressemblerait \u00e0 ceci :<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#EEFFFF;--cbp-line-number-width:calc(1 * 0.6 * .75rem);line-height:1rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#212121\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>name: CI\non: push\njobs:\n  prod-check:\n    if: github.ref == 'refs\/heads\/main'\n    runs-on: ubuntu-latest\n    steps:\n      ...<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-darker\" style=\"background-color: #212121\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #FFCB6B\">name:<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">CI<\/span><\/span>\n<span class=\"line\"><span style=\"color: #FFCB6B\">on:<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">push<\/span><\/span>\n<span class=\"line\"><span style=\"color: #82AAFF\">jobs<\/span><span style=\"color: #EEFFFF\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  <\/span><span style=\"color: #FFCB6B\">prod-check:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    if: github.ref == <\/span><span style=\"color: #89DDFF\">&#39;<\/span><span style=\"color: #C3E88D\">refs\/heads\/main<\/span><span style=\"color: #89DDFF\">&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #FFCB6B\">runs-on:<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">ubuntu-latest<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #FFCB6B\">steps:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">      <\/span><span style=\"color: #82AAFF\">...<\/span><\/span><\/code><\/pre><\/div>\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>Remarquez que dans cet exemple, la syntaxe&nbsp;<code>${{ }}<\/code>&nbsp;est absente.<\/strong><\/h3>\n\n\n\n<p>Avec certaines expressions, comme la condition&nbsp;<code>if<\/code>, vous pouvez omettre la syntaxe d\u2019expression. GitHub \u00e9value automatiquement certaines de ces expressions courantes, mais vous pouvez toujours inclure la syntaxe&nbsp;<code>${{ }}<\/code>&nbsp;au cas o\u00f9 vous oublieriez lesquelles sont \u00e9valu\u00e9es automatiquement.<\/p>\n\n\n\n<p>Pour plus d\u2019informations sur la syntaxe des workflows et les expressions, consultez la documentation&nbsp;<strong>Workflow syntax for GitHub Actions<\/strong>.<\/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>D\u00e9sactiver et supprimer des workflows<\/strong><\/h3>\n\n\n\n<p>Apr\u00e8s avoir ajout\u00e9 un workflow \u00e0 votre d\u00e9p\u00f4t, vous pourriez rencontrer une situation o\u00f9 vous souhaitez le d\u00e9sactiver temporairement.<br>Vous pouvez emp\u00eacher un workflow d\u2019\u00eatre d\u00e9clench\u00e9&nbsp;<strong>sans avoir \u00e0 supprimer le fichier du d\u00e9p\u00f4t<\/strong>, que ce soit via l\u2019interface GitHub ou l\u2019API REST de GitHub.<br>Lorsque vous souhaitez r\u00e9activer le workflow, vous pouvez facilement le faire en utilisant les m\u00eames m\u00e9thodes.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"285\" data-src=\"https:\/\/techhub.saworks.io\/wp-content\/uploads\/2025\/07\/image-48-1024x285.png\" alt=\"\" class=\"wp-image-5267 lazyload\" data-srcset=\"https:\/\/techhub.saworks.io\/wp-content\/uploads\/2025\/07\/image-48-1024x285.png 1024w, https:\/\/techhub.saworks.io\/wp-content\/uploads\/2025\/07\/image-48-300x83.png 300w, https:\/\/techhub.saworks.io\/wp-content\/uploads\/2025\/07\/image-48-768x214.png 768w, https:\/\/techhub.saworks.io\/wp-content\/uploads\/2025\/07\/image-48.png 1265w\" data-sizes=\"(max-width: 1024px) 100vw, 1024px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1024px; --smush-placeholder-aspect-ratio: 1024\/285;\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>D\u00e9sactiver un workflow peut \u00eatre utile dans les situations suivantes :<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Une erreur dans un workflow g\u00e9n\u00e8re trop de requ\u00eates (ou des requ\u00eates incorrectes) qui affectent n\u00e9gativement des services externes.<\/li>\n\n\n\n<li>Vous souhaitez mettre temporairement en pause un workflow non critique qui consomme trop de minutes sur votre compte.<\/li>\n\n\n\n<li>Vous voulez suspendre un workflow qui envoie des requ\u00eates \u00e0 un service actuellement hors ligne.<\/li>\n\n\n\n<li>Vous travaillez sur un fork et n\u2019avez pas besoin de toutes les fonctionnalit\u00e9s de certains workflows inclus (comme les workflows planifi\u00e9s).<\/li>\n<\/ul>\n\n\n\n<p>Vous pouvez \u00e9galement&nbsp;<strong>annuler une ex\u00e9cution de workflow en cours<\/strong>&nbsp;depuis l\u2019interface GitHub (onglet&nbsp;<strong>Actions<\/strong>) ou en utilisant l\u2019API GitHub avec le point de terminaison suivant :<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#EEFFFF;--cbp-line-number-width:calc(1 * 0.6 * .75rem);line-height:1rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#212121\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>DELETE \/repos\/{owner}\/{repo}\/actions\/runs\/{run_id}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-darker\" style=\"background-color: #212121\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #FFCB6B\">DELETE<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">\/repos\/{owner}\/{repo}\/actions\/runs\/{run_id}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>\u00c0 noter : lorsque vous annulez une ex\u00e9cution de workflow, GitHub annule tous les jobs et \u00e9tapes associ\u00e9s \u00e0 cette ex\u00e9cution.<\/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>Utiliser un workflow mod\u00e8le d\u2019organisation<\/strong><\/h3>\n\n\n\n<p>Si vous avez un workflow utilis\u00e9 par plusieurs \u00e9quipes au sein d\u2019une organisation, vous n\u2019avez pas besoin de le recr\u00e9er dans chaque d\u00e9p\u00f4t.<br>Vous pouvez promouvoir la coh\u00e9rence dans votre organisation en utilisant un&nbsp;<strong>mod\u00e8le de workflow<\/strong>&nbsp;d\u00e9fini dans le d\u00e9p\u00f4t&nbsp;<code>.github<\/code>&nbsp;de l\u2019organisation.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Tout membre de l\u2019organisation peut utiliser un workflow mod\u00e8le.<\/li>\n\n\n\n<li>Tous les d\u00e9p\u00f4ts de l\u2019organisation ont acc\u00e8s \u00e0 ces workflows mod\u00e8les.<\/li>\n<\/ul>\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>Comment les trouver :<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Acc\u00e9dez \u00e0 l\u2019onglet&nbsp;<strong>Actions<\/strong>&nbsp;d\u2019un d\u00e9p\u00f4t de l\u2019organisation.<\/li>\n\n\n\n<li>Cliquez sur&nbsp;<strong>New workflow<\/strong>.<\/li>\n\n\n\n<li>Recherchez la section intitul\u00e9e&nbsp;<strong>\u00ab Workflows cr\u00e9\u00e9s par [nom de l\u2019organisation] \u00bb<\/strong>.<\/li>\n<\/ol>\n\n\n\n<p>Par exemple, l\u2019organisation appel\u00e9e&nbsp;<strong>Mona<\/strong>&nbsp;propose un mod\u00e8le de workflow comme illustr\u00e9 ici.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"884\" height=\"614\" data-src=\"https:\/\/techhub.saworks.io\/wp-content\/uploads\/2025\/07\/image-50.png\" alt=\"\" class=\"wp-image-5271 lazyload\" data-srcset=\"https:\/\/techhub.saworks.io\/wp-content\/uploads\/2025\/07\/image-50.png 884w, https:\/\/techhub.saworks.io\/wp-content\/uploads\/2025\/07\/image-50-300x208.png 300w, https:\/\/techhub.saworks.io\/wp-content\/uploads\/2025\/07\/image-50-768x533.png 768w\" data-sizes=\"(max-width: 884px) 100vw, 884px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 884px; --smush-placeholder-aspect-ratio: 884\/614;\" \/><\/figure>\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>Utiliser des versions sp\u00e9cifiques d\u2019une action<\/strong><\/h3>\n\n\n\n<p>Lorsque vous faites r\u00e9f\u00e9rence \u00e0 des actions dans votre workflow, il est recommand\u00e9 d\u2019utiliser une&nbsp;<strong>version sp\u00e9cifique<\/strong>&nbsp;de l\u2019action plut\u00f4t que de simplement mentionner l\u2019action elle-m\u00eame.<br>En r\u00e9f\u00e9rant une version pr\u00e9cise, vous vous prot\u00e9gez contre des modifications inattendues qui pourraient \u00eatre apport\u00e9es \u00e0 l\u2019action et qui risqueraient de casser votre workflow.<\/p>\n\n\n\n<p>Voici plusieurs fa\u00e7ons de r\u00e9f\u00e9rencer une version sp\u00e9cifique d\u2019une action :<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#EEFFFF;--cbp-line-number-width:calc(1 * 0.6 * .75rem);line-height:1rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#212121\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>steps:    \n  # Reference a specific commit\n  - uses: actions\/setup-node@c46424eee26de4078d34105d3de3cc4992202b1e\n  # Reference the major version of a release\n  - uses: actions\/setup-node@v1\n  # Reference a minor version of a release\n  - uses: actions\/setup-node@v1.2\n  # Reference a branch\n  - uses: actions\/setup-node@main<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-darker\" style=\"background-color: #212121\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #FFCB6B\">steps:<\/span><span style=\"color: #EEFFFF\">    <\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  <\/span><span style=\"color: #545454; font-style: italic\"># Reference a specific commit<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  <\/span><span style=\"color: #FFCB6B\">-<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">uses:<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">actions\/setup-node@c46424eee26de4078d34105d3de3cc4992202b1e<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  <\/span><span style=\"color: #545454; font-style: italic\"># Reference the major version of a release<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  <\/span><span style=\"color: #FFCB6B\">-<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">uses:<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">actions\/setup-node@v1<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  <\/span><span style=\"color: #545454; font-style: italic\"># Reference a minor version of a release<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  <\/span><span style=\"color: #FFCB6B\">-<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">uses:<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">actions\/setup-node@v1.2<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  <\/span><span style=\"color: #545454; font-style: italic\"># Reference a branch<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  <\/span><span style=\"color: #FFCB6B\">-<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">uses:<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #C3E88D\">actions\/setup-node@main<\/span><\/span><\/code><\/pre><\/div>\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>Certaines r\u00e9f\u00e9rences sont plus s\u00fbres que d&rsquo;autres.<\/strong><\/h3>\n\n\n\n<p>Par exemple, faire r\u00e9f\u00e9rence \u00e0 une&nbsp;<strong>branche sp\u00e9cifique<\/strong>&nbsp;ex\u00e9cute l\u2019action \u00e0 partir des derni\u00e8res modifications de cette branche, ce qui peut \u00eatre souhait\u00e9 ou non.<br>En revanche, en faisant r\u00e9f\u00e9rence \u00e0 un&nbsp;<strong>num\u00e9ro de version<\/strong>&nbsp;ou \u00e0 un&nbsp;<strong>hash SHA de commit<\/strong>, vous \u00eates plus pr\u00e9cis sur la version de l\u2019action que vous ex\u00e9cutez.<\/p>\n\n\n\n<p>Pour plus de&nbsp;<strong>stabilit\u00e9 et de s\u00e9curit\u00e9<\/strong>, il est recommand\u00e9 d\u2019utiliser le&nbsp;<strong>SHA du commit<\/strong>&nbsp;d\u2019une action publi\u00e9e dans vos workflows.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Ici, vous d\u00e9couvrez quelques configurations courantes dans un fichier de workflow. Vous explorez \u00e9galement les cat\u00e9gories de types d&rsquo;\u00e9v\u00e9nements, la d\u00e9sactivation et la [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":5238,"menu_order":5,"comment_status":"closed","ping_status":"closed","template":"","doc_tag":[],"doc_badge":[],"class_list":["post-5260","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\/5260"}],"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=5260"}],"version-history":[{"count":0,"href":"https:\/\/techhub.saworks.io\/fr\/wp-json\/wp\/v2\/docs\/5260\/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=5260"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/techhub.saworks.io\/fr\/wp-json\/wp\/v2\/doc_tag?post=5260"},{"taxonomy":"doc_badge","embeddable":true,"href":"https:\/\/techhub.saworks.io\/fr\/wp-json\/wp\/v2\/doc_badge?post=5260"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}