From 749df70cf3907689c12c92f96deeeb8686a6a271 Mon Sep 17 00:00:00 2001 From: Aaron Stewart Date: Wed, 28 Sep 2022 11:34:56 -0600 Subject: [PATCH 01/14] Update index.yml --- github/create-custom-github-actions/index.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github/create-custom-github-actions/index.yml b/github/create-custom-github-actions/index.yml index c81ef5c2..ecc4354e 100644 --- a/github/create-custom-github-actions/index.yml +++ b/github/create-custom-github-actions/index.yml @@ -3,7 +3,7 @@ uid: learn.github.create-custom-github-actions metadata: title: Create and publish custom GitHub actions description: Learn how to create and publish custom GitHub actions. - ms.date: 08/08/2022 + ms.date: 09/28/2022 author: a-a-ron ms.author: aastewar ms.topic: interactive-tutorial From 9eab37a1bb7f1cb88d4e31ed7f33e421271deb44 Mon Sep 17 00:00:00 2001 From: Ross Mallory <81823408+rmallorybpc@users.noreply.github.com> Date: Thu, 29 Sep 2022 09:01:59 -0400 Subject: [PATCH 02/14] Update introduction.md Remove duplicate information from the Introduction unit. --- .../includes/introduction.md | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/github/create-custom-github-actions/includes/introduction.md b/github/create-custom-github-actions/includes/introduction.md index 30b9ef36..23313410 100644 --- a/github/create-custom-github-actions/includes/introduction.md +++ b/github/create-custom-github-actions/includes/introduction.md @@ -3,25 +3,3 @@ GitHub Actions allow you to create individual, custom actions by writing code th You can write your own custom actions to use in your workflow or share the actions you build with the GitHub community. To share actions you've built with the community, your repository must be public. Actions can run directly on compute resources, such as virtual machines, or in Docker containers. You can also define an action's inputs, outputs, and environment variables. In this module, you learn the different ways to create a custom action, its necessary metadata and syntax, and how to publish a custom action to the GitHub Marketplace. - -## Learning objectives - -In this module, you will: - -- Identify the metadata and syntax needed to create custom GitHub actions -- Learn best practices to publish a private or public GitHub action -- Consume actions within a workflow file -- Create custom JavaScript based actions -- Publish a newly created action to the GitHub Marketplace - -## Prerequisites - -This module assumes you have basic familiarity with GitHub Actions and workflows. - -- A GitHub account -- The ability to navigate and edit files in GitHub - - For more information about GitHub, see [Introduction to GitHub](https://lab.github.com/githubtraining/introduction-to-github?azure-portal=true). -- Basic familiarity with GitHub Actions and workflows - - If you aren't familiar with workflows, jobs and steps, check out the [Automate development tasks by using GitHub Actions](/learn/modules/github-actions-automate-tasks/) module. -- Basic familiarity with continuous integration using GitHub Actions and workflows - - If you're unfamiliar with continuous integration using GitHub Actions and workflows, check out [Build continuous integration workflows by using GitHub Actions](/learn/modules/github-actions-ci/) \ No newline at end of file From 9ee1b41d2fa67711967db3314578b3ac7e8aeaaa Mon Sep 17 00:00:00 2001 From: Ross Mallory <81823408+rmallorybpc@users.noreply.github.com> Date: Thu, 29 Sep 2022 09:08:59 -0400 Subject: [PATCH 03/14] Update index.yml Move Learning Objectives and Prerequisite from the Introduction to the Launch page (index.yml file). --- github/create-custom-github-actions/index.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/github/create-custom-github-actions/index.yml b/github/create-custom-github-actions/index.yml index ecc4354e..5e46e035 100644 --- a/github/create-custom-github-actions/index.yml +++ b/github/create-custom-github-actions/index.yml @@ -29,10 +29,13 @@ products: prerequisites: | - A GitHub account - The ability to navigate and edit files in GitHub + - For more information about GitHub, see [Introduction to GitHub](https://lab.github.com/githubtraining/introduction-to-github?azure-portal=true). - Basic familiarity with GitHub Actions and workflows + - If you aren't familiar with workflows, jobs and steps, check out the [Automate development tasks by using GitHub Actions](/learn/modules/github-actions-automate-tasks/) module. - Basic familiarity with continuous integration using GitHub Actions and workflows subjects: -- devops + - If you're unfamiliar with continuous integration using GitHub Actions and workflows, check out [Build continuous integration workflows by using GitHub Actions](/learn/modules/github-actions-ci/) + - devops units: - learn.github.create-custom-github-actions.introduction - learn.github.create-custom-github-actions.create-custom-github-action From 98fff6a2d71f4fabc68e0b005f9646d7a7836ea0 Mon Sep 17 00:00:00 2001 From: Ross Mallory <81823408+rmallorybpc@users.noreply.github.com> Date: Thu, 29 Sep 2022 10:02:49 -0400 Subject: [PATCH 04/14] Update introduction.md Update the Introduction to start the learning story. --- .../create-custom-github-actions/includes/introduction.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/github/create-custom-github-actions/includes/introduction.md b/github/create-custom-github-actions/includes/introduction.md index 23313410..dc116af0 100644 --- a/github/create-custom-github-actions/includes/introduction.md +++ b/github/create-custom-github-actions/includes/introduction.md @@ -1,5 +1,7 @@ -GitHub Actions allow you to create individual, custom actions by writing code that interacts with your repository in any way you'd like, including integrating with GitHub's APIs and any publicly available third-party API. For example, an action can publish npm modules, send SMS alerts when urgent issues are created, or deploy production-ready code. +GitHub Actions allow you to create individual, custom actions by writing code that interacts with your repository in any way you'd like, including integrating with GitHub's APIs and any publicly available third-party API. -You can write your own custom actions to use in your workflow or share the actions you build with the GitHub community. To share actions you've built with the community, your repository must be public. Actions can run directly on compute resources, such as virtual machines, or in Docker containers. You can also define an action's inputs, outputs, and environment variables. +Suppose you are a developer needing custom solutions for npm modules, sending SMS alerts when urgent issues are created, or deploying production-ready code. By utilizing GitHub Action, you can write your own custom actions to use in your workflow or share the actions you build with the GitHub community. GitHub Actions can run directly on computer resources, such as virtual machines, or in Docker containers. You can go beyond just DevOps when you use GitHub Actions to run workflows when other events happen in your repository. And for example, you can run a workflow to automatically add the appropriate labels whenever someone creates a new issue in your repository. -In this module, you learn the different ways to create a custom action, its necessary metadata and syntax, and how to publish a custom action to the GitHub Marketplace. +In this module, you'll learn the different ways to create a custom action, its necessary metadata and syntax, and how to publish a custom action to the GitHub Marketplace. + +Next up, learn about GitHub Actions, the metadata, syntax, and workflow commands to create custom GitHub Actions. From 21d0341033df054cc7a8866b4ee953e5ad038d85 Mon Sep 17 00:00:00 2001 From: Ross Mallory <81823408+rmallorybpc@users.noreply.github.com> Date: Thu, 29 Sep 2022 10:36:49 -0400 Subject: [PATCH 05/14] Update introduction.md Quick rework edit. --- github/create-custom-github-actions/includes/introduction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github/create-custom-github-actions/includes/introduction.md b/github/create-custom-github-actions/includes/introduction.md index dc116af0..bf11ac77 100644 --- a/github/create-custom-github-actions/includes/introduction.md +++ b/github/create-custom-github-actions/includes/introduction.md @@ -4,4 +4,4 @@ Suppose you are a developer needing custom solutions for npm modules, sending SM In this module, you'll learn the different ways to create a custom action, its necessary metadata and syntax, and how to publish a custom action to the GitHub Marketplace. -Next up, learn about GitHub Actions, the metadata, syntax, and workflow commands to create custom GitHub Actions. +Next up, learn about the metadata, syntax, and workflow commands to create custom GitHub Actions. From fdecb518964d1053a41dfd18b797907052bef8bb Mon Sep 17 00:00:00 2001 From: Ross Mallory <81823408+rmallorybpc@users.noreply.github.com> Date: Thu, 29 Sep 2022 11:01:52 -0400 Subject: [PATCH 06/14] Update introduction.md Minor editing. --- github/create-custom-github-actions/includes/introduction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github/create-custom-github-actions/includes/introduction.md b/github/create-custom-github-actions/includes/introduction.md index bf11ac77..9c93a138 100644 --- a/github/create-custom-github-actions/includes/introduction.md +++ b/github/create-custom-github-actions/includes/introduction.md @@ -4,4 +4,4 @@ Suppose you are a developer needing custom solutions for npm modules, sending SM In this module, you'll learn the different ways to create a custom action, its necessary metadata and syntax, and how to publish a custom action to the GitHub Marketplace. -Next up, learn about the metadata, syntax, and workflow commands to create custom GitHub Actions. +Up next, learn about the metadata, syntax, and workflow commands to create custom GitHub Actions. From f699148d57c91cbe0364a2971202eb5b56a79b01 Mon Sep 17 00:00:00 2001 From: Ross Mallory <81823408+rmallorybpc@users.noreply.github.com> Date: Thu, 29 Sep 2022 11:06:28 -0400 Subject: [PATCH 07/14] Update index.yml Reworked the learning objectives. --- github/create-custom-github-actions/index.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/github/create-custom-github-actions/index.yml b/github/create-custom-github-actions/index.yml index 5e46e035..255b6c0d 100644 --- a/github/create-custom-github-actions/index.yml +++ b/github/create-custom-github-actions/index.yml @@ -14,9 +14,8 @@ abstract: | In this module, you will learn how to: - Identify the metadata and syntax needed to create custom GitHub actions - Learn best practices to publish a private or public GitHub action - - Consume actions within a workflow file - - Create custom JavaScript based actions - Publish a newly created action to the GitHub Marketplace + - Create custom JavaScript based actions levels: - intermediate roles: From 14ba46b2b00d7f32595080cda1c4f109acc67e96 Mon Sep 17 00:00:00 2001 From: Ross Mallory <81823408+rmallorybpc@users.noreply.github.com> Date: Fri, 30 Sep 2022 08:22:49 -0400 Subject: [PATCH 08/14] Update create-custom-github-action.md Edit to the order of the opening paragraph. --- .../includes/create-custom-github-action.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github/create-custom-github-actions/includes/create-custom-github-action.md b/github/create-custom-github-actions/includes/create-custom-github-action.md index 4f43d898..6c99b2b3 100644 --- a/github/create-custom-github-actions/includes/create-custom-github-action.md +++ b/github/create-custom-github-actions/includes/create-custom-github-action.md @@ -1,4 +1,4 @@ -GitHub Actions is a powerful feature that empowers you to go from code to cloud all from the comfort and convenience of your own repository. Here, you'll learn about the different types of GitHub actions and the metadata, syntax, and workflow commands to create custom GitHub actions. +Here, you'll learn about the different types of GitHub actions and the metadata, syntax, and workflow commands to create custom GitHub actions. GitHub Actions is a powerful feature that empowers you to go from code to cloud all from the comfort and convenience of your own repository. ## Types of GitHub actions From 1ac819712ab1e232b81e84528b1fa72ef767120c Mon Sep 17 00:00:00 2001 From: Ross Mallory <81823408+rmallorybpc@users.noreply.github.com> Date: Mon, 3 Oct 2022 07:52:54 -0400 Subject: [PATCH 09/14] Update introduction.md Edits for learner flow. --- github/create-custom-github-actions/includes/introduction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github/create-custom-github-actions/includes/introduction.md b/github/create-custom-github-actions/includes/introduction.md index 9c93a138..39164e9c 100644 --- a/github/create-custom-github-actions/includes/introduction.md +++ b/github/create-custom-github-actions/includes/introduction.md @@ -1,6 +1,6 @@ GitHub Actions allow you to create individual, custom actions by writing code that interacts with your repository in any way you'd like, including integrating with GitHub's APIs and any publicly available third-party API. -Suppose you are a developer needing custom solutions for npm modules, sending SMS alerts when urgent issues are created, or deploying production-ready code. By utilizing GitHub Action, you can write your own custom actions to use in your workflow or share the actions you build with the GitHub community. GitHub Actions can run directly on computer resources, such as virtual machines, or in Docker containers. You can go beyond just DevOps when you use GitHub Actions to run workflows when other events happen in your repository. And for example, you can run a workflow to automatically add the appropriate labels whenever someone creates a new issue in your repository. +Suppose you are a developer needing your actions to run in a specific environment configuration, need custom solutions for npm modules, or deploying production-ready code. By utilizing GitHub Actions, you can write your own custom actions to use in your workflow or share the actions you build with the GitHub community. GitHub Actions can run directly on computer resources, such as virtual machines, in Docker containers, or by utilizing Node.js. You can go beyond just DevOps when you use GitHub Actions to run workflows when other events happen in your repository. And for example, you can run a workflow to automatically add the appropriate labels whenever someone creates a new issue in your repository. In this module, you'll learn the different ways to create a custom action, its necessary metadata and syntax, and how to publish a custom action to the GitHub Marketplace. From d1913b1a0a0169d3d63f680b81e130c53c9ce86d Mon Sep 17 00:00:00 2001 From: Ross Mallory <81823408+rmallorybpc@users.noreply.github.com> Date: Mon, 3 Oct 2022 07:56:39 -0400 Subject: [PATCH 10/14] Update create-custom-github-action.md End flow edits. --- .../includes/create-custom-github-action.md | 1 + 1 file changed, 1 insertion(+) diff --git a/github/create-custom-github-actions/includes/create-custom-github-action.md b/github/create-custom-github-actions/includes/create-custom-github-action.md index 6c99b2b3..65730582 100644 --- a/github/create-custom-github-actions/includes/create-custom-github-action.md +++ b/github/create-custom-github-actions/includes/create-custom-github-action.md @@ -187,3 +187,4 @@ This text spans%0Aacross multiple lines In addition to workflow commands, you can set exit codes to set the status of an action. This is important because when you're working with jobs in a workflow, a failed exit code will halt all concurrent actions and cancel any future actions. If you are creating a JavaScript action, you can use the actions toolkit `@actions/core` package to log a message and set a failure exit code. If you are creating a Docker container action, you can set a failure exit code in your `entrypoint.sh` script. +Next up, learn about choosing the right visibility for your action, best practices for documenting and versioning your action, and how to publish your action to the GitHub Marketplace. From 43d834f2be0e3843f22541e85c4617c80f9b272c Mon Sep 17 00:00:00 2001 From: Ross Mallory <81823408+rmallorybpc@users.noreply.github.com> Date: Mon, 3 Oct 2022 07:58:34 -0400 Subject: [PATCH 11/14] Update publish-custom-github-action.md End flow edits. --- .../includes/publish-custom-github-action.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/github/create-custom-github-actions/includes/publish-custom-github-action.md b/github/create-custom-github-actions/includes/publish-custom-github-action.md index b77d1f6e..da1fbef2 100644 --- a/github/create-custom-github-actions/includes/publish-custom-github-action.md +++ b/github/create-custom-github-actions/includes/publish-custom-github-action.md @@ -85,4 +85,6 @@ Below are the requirements to publish an action to the GitHub Marketplace. They - The `name` cannot match an existing GitHub Marketplace category. - The `name` cannot match an existing GitHub feature. -You can add the action you've created to the GitHub Marketplace by tagging it as a new release and then publishing it. There are a few guided steps in GitHub that enable you to publish a release of your action. More information on these steps can be found in the summary section at the end of this module. +You can add the action you've created to the GitHub Marketplace by tagging it as a new release and then publishing it. There are a few guided steps in GitHub that enable you to publish a release of your action. + +Next up, an exercise walking you through writing your own GitHub JavaScript Action and automate customized tasks unique to your workflow. From 561a53916611734ec5241ae057fb616aa3cde038 Mon Sep 17 00:00:00 2001 From: Ross Mallory <81823408+rmallorybpc@users.noreply.github.com> Date: Mon, 3 Oct 2022 08:03:02 -0400 Subject: [PATCH 12/14] Update exercise-create-custom-action.yml Updated the length information. --- .../exercise-create-custom-action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/github/create-custom-github-actions/exercise-create-custom-action.yml b/github/create-custom-github-actions/exercise-create-custom-action.yml index 626b9483..290c07af 100644 --- a/github/create-custom-github-actions/exercise-create-custom-action.yml +++ b/github/create-custom-github-actions/exercise-create-custom-action.yml @@ -9,6 +9,6 @@ metadata: ms.date: 04/14/2021 ms.topic: interactive-tutorial ms.prod: learning-azure -durationInMinutes: 6 +durationInMinutes: the page takes about 6 minutes, the exercise is 6 steps long and takes about 1 to 2 hours to be completed content: | - [!include[](includes/exercise-create-custom-action.md)] \ No newline at end of file + [!include[](includes/exercise-create-custom-action.md)] From a939587b1ea83eceb2b5989c790e6049e2eae49d Mon Sep 17 00:00:00 2001 From: Ross Mallory <81823408+rmallorybpc@users.noreply.github.com> Date: Mon, 3 Oct 2022 08:27:14 -0400 Subject: [PATCH 13/14] Update knowledge-check.yml Updated question one, anwers, and explanations because Ruby was not discussed in the unit contents. Updated answer 4 in question 3 because it was too close to answer 1. --- .../knowledge-check.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/github/create-custom-github-actions/knowledge-check.yml b/github/create-custom-github-actions/knowledge-check.yml index eecb2860..c4d3c448 100644 --- a/github/create-custom-github-actions/knowledge-check.yml +++ b/github/create-custom-github-actions/knowledge-check.yml @@ -15,20 +15,20 @@ content: | quiz: title: Check your knowledge questions: - - content: "You need to create a custom GitHub Action written in Ruby. Which action type would you choose?" + - content: "You want your action to run in a consistent and reliable environment. Which action type would you choose?" choices: - content: "JavaScript action" isCorrect: false - explanation: "Although you can write actions in JavaScript, Docker container actions are used for other languages." + explanation: "JavaScript actions separate the action code from the environment that is used to run the action." - content: "Run step" isCorrect: false - explanation: "Run steps execute terminal commands within a runner." + explanation: "Composite run steps actions allow you to mix multiple shell languages within the same action, not create consistent and reliable environments." - content: "Docker container action" isCorrect: true - explanation: "Actions written in a language other than JavaScript must be placed inside of a Docker container." + explanation: "Docker containers package the environment with the GitHub Actions code, meaning the action runs in a consistent and reliable environment." - content: "Bash script" isCorrect: false - explanation: "Bash scripts would either need to be run in Docker or as a parameter to a Run step." + explanation: "Bash scripts are a parameter to a Run step, not how your actions run in a consistent and reliable environment." - content: "Which keywords are required for a valid `action.yml` file?" choices: - content: "name, runs, composite" @@ -54,6 +54,6 @@ quiz: - content: echo "::error::message=This is an error message" isCorrect: false explanation: "This is improper syntax for a workflow command." - - content: echo "::error::This is an error message::" + - content: echo "::errorThis is an error message::" isCorrect: false - explanation: "This is improper syntax for a workflow command." \ No newline at end of file + explanation: "This is improper syntax for a workflow command." From 18e0538f7f461cc37635812fd8c563920870d50f Mon Sep 17 00:00:00 2001 From: Ross Mallory <81823408+rmallorybpc@users.noreply.github.com> Date: Thu, 13 Oct 2022 11:12:12 -0600 Subject: [PATCH 14/14] Update introduction.md Added the prerequisites and learning objectives back --- .../includes/introduction.md | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/github/create-custom-github-actions/includes/introduction.md b/github/create-custom-github-actions/includes/introduction.md index 39164e9c..41f4677e 100644 --- a/github/create-custom-github-actions/includes/introduction.md +++ b/github/create-custom-github-actions/includes/introduction.md @@ -4,4 +4,25 @@ Suppose you are a developer needing your actions to run in a specific environmen In this module, you'll learn the different ways to create a custom action, its necessary metadata and syntax, and how to publish a custom action to the GitHub Marketplace. +### Learning objectives + +In this module, you will learn how to: + +- Identify the metadata and syntax needed to create custom GitHub actions +- Learn best practices to publish a private or public GitHub action +- Publish a newly created action to the GitHub Marketplace +- Create custom JavaScript based actions + +### Prerequisites + +This module assumes you have basic familiarity with GitHub Actions and workflows. + +- A GitHub account +- The ability to navigate and edit files in GitHub + - For more information about GitHub, see [Introduction to GitHub](https://learn.microsoft.com/en-us/training/modules/introduction-to-github/). +- Basic familiarity with GitHub Actions and workflows + - If you aren't familiar with workflows, jobs and steps, check out the [Automate development tasks by using GitHub Actions](https://learn.microsoft.com/en-us/training/modules/github-actions-automate-tasks/) module. +- Basic familiarity with continuous integration using GitHub Actions and workflows + - If you're unfamiliar with continuous integration using GitHub Actions and workflows, check out [Build continuous integration workflows by using GitHub Actions](https://learn.microsoft.com/en-us/training/modules/github-actions-ci/) + Up next, learn about the metadata, syntax, and workflow commands to create custom GitHub Actions.