Merge pull request #12 from actions/JenniferKerns-patch-12

copyedits to lab 5
This commit is contained in:
Ethan Dennis
2022-11-06 18:02:20 -08:00
committed by GitHub
+5 -5
View File
@@ -1,6 +1,6 @@
# Using custom transformers to customize GitHub Actions Importer's behavior # Use custom transformers to customize GitHub Actions Importer's behavior
In this lab you will build upon the `dry-run` command to override GitHub Actions Importer's default behavior and customize the converted workflow using "custom transformers". Custom transformers can be used to: In this lab, you will build upon the `dry-run` command to override GitHub Actions Importer's default behavior and customize the converted workflow using "custom transformers." Custom transformers can be used to:
1. Convert items that are not automatically converted. 1. Convert items that are not automatically converted.
2. Convert items that were automatically converted using different actions. 2. Convert items that were automatically converted using different actions.
@@ -13,7 +13,7 @@ In this lab you will build upon the `dry-run` command to override GitHub Actions
2. Completed the [configure lab](./1-configure.md#configuring-credentials). 2. Completed the [configure lab](./1-configure.md#configuring-credentials).
3. Completed the [dry-run lab](./4-dry-run.md). 3. Completed the [dry-run lab](./4-dry-run.md).
## Perform a dry-run ## Perform a dry run
You will be performing a `dry-run` command to inspect the workflow that is converted by default. Run the following command within the codespace terminal: You will be performing a `dry-run` command to inspect the workflow that is converted by default. Run the following command within the codespace terminal:
@@ -98,7 +98,7 @@ transform "codecov_codecov_upload" do |_item|
end end
``` ```
This method can use any valid ruby syntax and should return a `Hash` that represents the YAML that should be generated for a given step. GitHub Actions Importer will use this method to convert a step with the provided identifier and will use the `item` parameter for the original values configured in CircleCI. This method can use any valid Ruby syntax and should return a `Hash` that represents the YAML that should be generated for a given step. GitHub Actions Importer will use this method to convert a step with the provided identifier and will use the `item` parameter for the original values configured in CircleCI.
Now you can perform another `dry-run` command and use the `--custom-transformers` CLI option to provide this custom transformer. Run the following command within your codespace terminal: Now you can perform another `dry-run` command and use the `--custom-transformers` CLI option to provide this custom transformer. Run the following command within your codespace terminal:
@@ -187,7 +187,7 @@ end
</details> </details>
That's it! Congratulations, you have overridden GitHub Actions Importer's default behavior by customizing the conversion of: That's it. Congratulations, you have overridden GitHub Actions Importer's default behavior by customizing the conversion of:
- Unknown steps - Unknown steps
- Environment variables - Environment variables