|
25 | 25 | "outputs": [], |
26 | 26 | "source": [ |
27 | 27 | "#export\n", |
28 | | - "from fastcore.utils import *\n", |
29 | | - "from fastcore.script import *\n", |
30 | | - "from fastcore.foundation import *\n", |
31 | | - "from fastcore.meta import *\n", |
| 28 | + "from fastcore.all import *\n", |
32 | 29 | "from ghapi.core import *\n", |
33 | 30 | "from ghapi.templates import *\n", |
34 | 31 | "\n", |
|
65 | 62 | " CONTEXT_GITHUB: ${{ toJson(github) }}\n", |
66 | 63 | "```\n", |
67 | 64 | "\n", |
68 | | - "This stores the full [github context](https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#github-context), which includes information such as the name of the current workflow being run, the GitHub access token, and so forth.\n", |
| 65 | + "This stores the full [github context](https://docs.github.com/actions/reference/context-and-expression-syntax-for-github-actions#github-context), which includes information such as the name of the current workflow being run, the GitHub access token, and so forth.\n", |
69 | 66 | "\n", |
70 | 67 | "As well as the `github` context, you can do that same thing for any of the other GitHub Actions contexts, which are:\n", |
71 | 68 | "\n", |
72 | 69 | "`github` `env` `job` `steps` `runner` `secrets` `strategy` `matrix` `needs`\n", |
73 | 70 | "\n", |
74 | | - "For instance, for the [needs](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#jobsjob_idneeds) context, information about previous jobs specified in your `needs` clause, add this underneath your `CONTEXT_GITHUB` line:\n", |
| 71 | + "For instance, for the [needs](https://docs.github.com/actions/reference/workflow-syntax-for-github-actions#jobsjob_idneeds) context, information about previous jobs specified in your `needs` clause, add this underneath your `CONTEXT_GITHUB` line:\n", |
75 | 72 | "\n", |
76 | 73 | "```bash\n", |
77 | 74 | " CONTEXT_NEEDS: ${{ toJson(needs) }}\n", |
|
110 | 107 | "cell_type": "markdown", |
111 | 108 | "metadata": {}, |
112 | 109 | "source": [ |
113 | | - "GitHub also adds a number of [`GITHUB_*` environment variables](https://docs.github.com/en/free-pro-team@latest/actions/reference/environment-variables#default-environment-variables) to all runners. These are available through the `env_github` `AttrDict`, with the `GITHUB_` prefix removed, and remainder converted to lowercase. For instance:" |
| 110 | + "GitHub also adds a number of [`GITHUB_*` environment variables](https://docs.github.com/actions/reference/environment-variables#default-environment-variables) to all runners. These are available through the `env_github` `AttrDict`, with the `GITHUB_` prefix removed, and remainder converted to lowercase. For instance:" |
114 | 111 | ] |
115 | 112 | }, |
116 | 113 | { |
|
376 | 373 | "#export\n", |
377 | 374 | "@call_parse\n", |
378 | 375 | "def gh_create_workflow(\n", |
379 | | - " name:Param(\"Name of the workflow file\", str),\n", |
380 | | - " event:Param(\"Event to listen for\", str),\n", |
381 | | - " contexts:Param(\"Space-delimited extra contexts to include in `env` in addition to 'github'\", str)=''\n", |
| 376 | + " name:str, # Name of the workflow file\n", |
| 377 | + " event:str, # Event to listen for\n", |
| 378 | + " contexts:str='' # Space-delimited extra contexts to include in `env` in addition to github\n", |
382 | 379 | "):\n", |
383 | 380 | " \"Supports `gh-create-workflow`, a CLI wrapper for `create_workflow`.\"\n", |
384 | 381 | " create_workflow(name, Event[event], contexts.split())" |
|
531 | 528 | "cell_type": "markdown", |
532 | 529 | "metadata": {}, |
533 | 530 | "source": [ |
534 | | - "Details in the [GitHub Documentation for `set-output`](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-an-output-parameter)." |
| 531 | + "Details in the [GitHub Documentation for `set-output`](https://docs.github.com/actions/reference/workflow-commands-for-github-actions#setting-an-output-parameter)." |
535 | 532 | ] |
536 | 533 | }, |
537 | 534 | { |
|
550 | 547 | "cell_type": "markdown", |
551 | 548 | "metadata": {}, |
552 | 549 | "source": [ |
553 | | - "Details in the [GitHub Documentation for `debug`](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-a-debug-message). Note that you must create a secret named `ACTIONS_STEP_DEBUG` with the value true to see the debug messages set by this command in the log." |
| 550 | + "Details in the [GitHub Documentation for `debug`](https://docs.github.com/actions/reference/workflow-commands-for-github-actions#setting-a-debug-message). Note that you must create a secret named `ACTIONS_STEP_DEBUG` with the value true to see the debug messages set by this command in the log." |
554 | 551 | ] |
555 | 552 | }, |
556 | 553 | { |
|
569 | 566 | "cell_type": "markdown", |
570 | 567 | "metadata": {}, |
571 | 568 | "source": [ |
572 | | - "Details in the [GitHub Documentation for `warning`](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-a-warning-message). For the optional `details`, you can provide comma-delimited file, line, and column information, e.g.: `file=app.js,line=1,col=5`." |
| 569 | + "Details in the [GitHub Documentation for `warning`](https://docs.github.com/actions/reference/workflow-commands-for-github-actions#setting-a-warning-message). For the optional `details`, you can provide comma-delimited file, line, and column information, e.g.: `file=app.js,line=1,col=5`." |
573 | 570 | ] |
574 | 571 | }, |
575 | 572 | { |
|
588 | 585 | "cell_type": "markdown", |
589 | 586 | "metadata": {}, |
590 | 587 | "source": [ |
591 | | - "Details in the [GitHub Documentation for `error`](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-an-error-message). For the optional `details`, you can provide comma-delimited file, line, and column information, e.g.: `file=app.js,line=1,col=5`." |
| 588 | + "Details in the [GitHub Documentation for `error`](https://docs.github.com/actions/reference/workflow-commands-for-github-actions#setting-an-error-message). For the optional `details`, you can provide comma-delimited file, line, and column information, e.g.: `file=app.js,line=1,col=5`." |
592 | 589 | ] |
593 | 590 | }, |
594 | 591 | { |
|
629 | 626 | "cell_type": "markdown", |
630 | 627 | "metadata": {}, |
631 | 628 | "source": [ |
632 | | - "Details in the GitHub Documentation for [grouping log lines](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#grouping-log-lines)." |
| 629 | + "Details in the GitHub Documentation for [grouping log lines](https://docs.github.com/actions/reference/workflow-commands-for-github-actions#grouping-log-lines)." |
633 | 630 | ] |
634 | 631 | }, |
635 | 632 | { |
|
648 | 645 | "cell_type": "markdown", |
649 | 646 | "metadata": {}, |
650 | 647 | "source": [ |
651 | | - "Details in the [GitHub Documentation for `add-mask`](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#masking-a-value-in-log)." |
| 648 | + "Details in the [GitHub Documentation for `add-mask`](https://docs.github.com/actions/reference/workflow-commands-for-github-actions#masking-a-value-in-log)." |
652 | 649 | ] |
653 | 650 | }, |
654 | 651 | { |
|
723 | 720 | ], |
724 | 721 | "metadata": { |
725 | 722 | "kernelspec": { |
726 | | - "display_name": "Python 3", |
| 723 | + "display_name": "Python 3 (ipykernel)", |
727 | 724 | "language": "python", |
728 | 725 | "name": "python3" |
729 | 726 | } |
|
0 commit comments