---

title: GitHub Actions details


keywords: fastai
sidebar: home_sidebar

summary: "Functionality for helping to create GitHub Actions workflows in Python"
description: "Functionality for helping to create GitHub Actions workflows in Python"
nb_path: "01_actions.ipynb"
---
<!--

#################################################
### THIS FILE WAS AUTOGENERATED! DO NOT EDIT! ###
#################################################
# file to edit: 01_actions.ipynb
# command to build the docs after a change: nbdev_build_docs

-->

<div class="container" id="notebook-container">
        
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Workflow-setup">Workflow setup<a class="anchor-link" href="#Workflow-setup"> </a></h2>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>In your GitHub Actions workflow, include the following in your <code>run</code> step:</p>
<div class="highlight"><pre><span></span>env:
  CONTEXT_GITHUB: <span class="si">${</span><span class="p">{ toJson(github) </span><span class="si">}</span><span class="o">}</span>
</pre></div>
<p>This stores the full <a href="https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#github-context">github context</a>, which includes information such as the name of the current workflow being run, the GitHub access token, and so forth.</p>
<p>As well as the <code>github</code> context, you can do that same thing for any of the other GitHub Actions contexts, which are:</p>
<p><code>github</code> <code>env</code> <code>job</code> <code>steps</code> <code>runner</code> <code>secrets</code> <code>strategy</code> <code>matrix</code> <code>needs</code></p>
<p>For instance, for the <a href="https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#jobsjob_idneeds">needs</a> context, information about previous jobs specified in your <code>needs</code> clause, add this underneath your <code>CONTEXT_GITHUB</code> line:</p>
<div class="highlight"><pre><span></span>CONTEXT_NEEDS: <span class="si">${</span><span class="p">{ toJson(needs) </span><span class="si">}</span><span class="o">}</span>
</pre></div>
<p>Note that here's no harm having entries that are not used -- GitHub Actions will set them to an empty dictionary by default.</p>

</div>
</div>
</div>
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>GitHub also adds a number of <a href="https://docs.github.com/en/free-pro-team@latest/actions/reference/environment-variables#default-environment-variables"><code>GITHUB_*</code> environment variables</a> to all runners. These are available through the <a href="/actions.html#env_github"><code>env_github</code></a> <code>AttrDict</code>, with the <code>GITHUB_</code> prefix removed, and remainder converted to lowercase. For instance:</p>

</div>
</div>
</div>
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">

<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">env_github</span><span class="o">.</span><span class="n">repository</span>
</pre></div>

    </div>
</div>
</div>

<div class="output_wrapper">
<div class="output">

<div class="output_area">



<div class="output_text output_subarea output_execute_result">
<pre>&#39;octocat/Hello-World&#39;</pre>
</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="user_repo" class="doc_header"><code>user_repo</code><a href="https://github.com/fastai/ghapi/tree/master/ghapi/actions.py#L36" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>user_repo</code>()</p>
</blockquote>
<p>List of <code>user,repo</code> from `env_github.repository</p>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">

<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">user_repo</span><span class="p">()</span>
</pre></div>

    </div>
</div>
</div>

<div class="output_wrapper">
<div class="output">

<div class="output_area">



<div class="output_text output_subarea output_execute_result">
<pre>[&#39;octocat&#39;, &#39;Hello-World&#39;]</pre>
</div>

</div>

</div>
</div>

</div>
    {% endraw %}

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>The possible events are available in the <a href="/actions.html#Event"><code>Event</code></a> <code>enum</code>.</p>

</div>
</div>
</div>
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">

<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="s1">&#39;, &#39;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">Event</span><span class="p">)</span>
</pre></div>

    </div>
</div>
</div>

<div class="output_wrapper">
<div class="output">

<div class="output_area">



<div class="output_text output_subarea output_execute_result">
<pre>&#39;page_build, content_reference, repository_import, create, workflow_run, delete, organization, sponsorship, project_column, push, context, milestone, project_card, project, package, pull_request, repository_dispatch, team_add, workflow_dispatch, member, meta, code_scanning_alert, public, needs, check_run, security_advisory, pull_request_review_comment, org_block, commit_comment, watch, marketplace_purchase, star, installation_repositories, check_suite, github_app_authorization, team, status, repository_vulnerability_alert, pull_request_review, label, installation, release, issues, repository, gollum, membership, deployment, deploy_key, issue_comment, ping, deployment_status, fork, schedule&#39;</pre>
</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="create_workflow_files" class="doc_header"><code>create_workflow_files</code><a href="https://github.com/fastai/ghapi/tree/master/ghapi/actions.py#L58" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>create_workflow_files</code>(<strong><code>fname</code></strong>:<code>str</code>, <strong><code>workflow</code></strong>:<code>str</code>, <strong><code>build_script</code></strong>:<code>str</code>, <strong><code>prebuild</code></strong>:<code>bool</code>=<em><code>False</code></em>)</p>
</blockquote>
<p>Create workflow and script files in suitable places in <code>github</code> folder</p>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="fill_workflow_templates" class="doc_header"><code>fill_workflow_templates</code><a href="https://github.com/fastai/ghapi/tree/master/ghapi/actions.py#L70" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>fill_workflow_templates</code>(<strong><code>name</code></strong>:<code>str</code>, <strong><code>event</code></strong>, <strong><code>run</code></strong>, <strong><code>context</code></strong>, <strong><code>script</code></strong>, <strong><code>opersys</code></strong>=<em><code>'ubuntu'</code></em>, <strong><code>prebuild</code></strong>=<em><code>False</code></em>)</p>
</blockquote>
<p>Function to create a simple Ubuntu workflow that calls a Python <a href="/cli.html#ghapi"><code>ghapi</code></a> script</p>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p><a href="/event.html"><code>event</code></a> is the event to trigger on. <code>run</code> is the shell lines to run before running the script, such as a <code>pip install</code> step. <code>context</code> are the env var context lines to include in the <code>env:</code> section of the workflow, normally created with <a href="/actions.html#env_contexts"><code>env_contexts</code></a>. <code>opersys</code> can be a string containing a comma-separated list of operating systems, e.g. <code>macos, ubuntu, windows</code>, which will be used to create a parallel matrix build.</p>
<p>The <code>prebuild</code> bool tells <a href="/cli.html#ghapi"><code>ghapi</code></a> to include a prebuild job, which contains the following workflow:</p>
<div class="highlight"><pre><span></span>runs-on: ubuntu-latest
outputs:
  out: <span class="si">${</span><span class="p">{ toJson(steps) </span><span class="si">}</span><span class="o">}</span>
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v2
  with: <span class="o">{</span>python-version: <span class="s1">&#39;3.8&#39;</span><span class="o">}</span>
- name: Create release
  id: step1
  env:
    CONTEXT_GITHUB: <span class="si">${</span><span class="p">{ toJson(github) </span><span class="si">}</span><span class="o">}</span>
  run: <span class="p">|</span>
    pip install -q ghapi
    python .github/scripts/prebuild.py
</pre></div>

</div>
</div>
</div>
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="env_contexts" class="doc_header"><code>env_contexts</code><a href="https://github.com/fastai/ghapi/tree/master/ghapi/actions.py#L81" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>env_contexts</code>(<strong><code>contexts</code></strong>)</p>
</blockquote>
<p>Create a suitable <code>env:</code> line for a workflow to make a context available in the environment</p>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="create_workflow" class="doc_header"><code>create_workflow</code><a href="https://github.com/fastai/ghapi/tree/master/ghapi/actions.py#L90" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>create_workflow</code>(<strong><code>name</code></strong>:<code>str</code>, <strong><code>event</code></strong>:<a href="/actions.html#Event"><code>Event</code></a>, <strong><code>contexts</code></strong>:<code>list</code>=<em><code>None</code></em>, <strong><code>opersys</code></strong>=<em><code>'ubuntu'</code></em>, <strong><code>prebuild</code></strong>=<em><code>False</code></em>)</p>
</blockquote>
<p>Function to create a simple Ubuntu workflow that calls a Python <a href="/cli.html#ghapi"><code>ghapi</code></a> script</p>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">

<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">create_workflow</span><span class="p">(</span><span class="s1">&#39;test&#39;</span><span class="p">,</span> <span class="n">Event</span><span class="o">.</span><span class="n">release</span><span class="p">)</span>
</pre></div>

    </div>
</div>
</div>

</div>
    {% endraw %}

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>To create a basic <a href="/cli.html#ghapi"><code>ghapi</code></a> workflow, call <a href="/actions.html#create_workflow"><code>create_workflow</code></a>, passing in the event that you wish to respond to, and a name for your workflow.</p>

</div>
</div>
</div>
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="gh_create_workflow" class="doc_header"><code>gh_create_workflow</code><a href="https://github.com/fastai/ghapi/tree/master/ghapi/actions.py#L97" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>gh_create_workflow</code>(<strong><code>name</code></strong>:"Name of the workflow file", <strong><code>event</code></strong>:"Event to listen for", <strong><code>contexts</code></strong>:"Space-delimited extra contexts to include in <code>env</code> in addition to 'github'"=<em><code>''</code></em>)</p>
</blockquote>
<p>Supports <code>gh-create-workflow</code>, a CLI wrapper for <a href="/actions.html#create_workflow"><code>create_workflow</code></a>.</p>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Accessing-contexts-from-Python">Accessing contexts from Python<a class="anchor-link" href="#Accessing-contexts-from-Python"> </a></h2>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>The information from these variables are provided by <code>context_github</code>, <code>context_needs</code>, and so forth for each named context. These variables are <code>AttrDict</code> objects.</p>

</div>
</div>
</div>
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">

<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">L</span><span class="p">(</span><span class="n">context_github</span><span class="p">)</span>
</pre></div>

    </div>
</div>
</div>

<div class="output_wrapper">
<div class="output">

<div class="output_area">



<div class="output_text output_subarea output_execute_result">
<pre>(#26) [&#39;token&#39;,&#39;job&#39;,&#39;ref&#39;,&#39;sha&#39;,&#39;repository&#39;,&#39;repository_owner&#39;,&#39;repositoryUrl&#39;,&#39;run_id&#39;,&#39;run_number&#39;,&#39;retention_days&#39;...]</pre>
</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">

<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">context_github</span><span class="o">.</span><span class="n">ref</span>
</pre></div>

    </div>
</div>
</div>

<div class="output_wrapper">
<div class="output">

<div class="output_area">



<div class="output_text output_subarea output_execute_result">
<pre>&#39;refs/heads/master&#39;</pre>
</div>

</div>

</div>
</div>

</div>
    {% endraw %}

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>If you use our recommended workflow template, you will have this included in your prebuild step (if you have any):</p>
<div class="highlight"><pre><span></span>outputs:
  out: <span class="si">${</span><span class="p">{ toJson(steps) </span><span class="si">}</span><span class="o">}</span>
</pre></div>
<p>You can access this content as a dictionary like so:</p>

</div>
</div>
</div>
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">

<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">loads</span><span class="p">(</span><span class="n">nested_idx</span><span class="p">(</span><span class="n">context_needs</span><span class="p">,</span> <span class="s2">&quot;prebuild&quot;</span><span class="p">,</span> <span class="s2">&quot;outputs&quot;</span><span class="p">,</span> <span class="s2">&quot;out&quot;</span><span class="p">))</span>
</pre></div>

    </div>
</div>
</div>

<div class="output_wrapper">
<div class="output">

<div class="output_area">



<div class="output_text output_subarea output_execute_result">
<pre>{&#39;step1&#39;: {&#39;outputs&#39;: {&#39;tag&#39;: &#39;v0.79.0&#39;},
  &#39;outcome&#39;: &#39;success&#39;,
  &#39;conclusion&#39;: &#39;success&#39;}}</pre>
</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="example_payload" class="doc_header"><code>example_payload</code><a href="https://github.com/fastai/ghapi/tree/master/ghapi/actions.py#L110" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>example_payload</code>(<strong><code>event</code></strong>)</p>
</blockquote>
<p>Get an example of a JSON payload for <code>event</code></p>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Workflow-helper-functions">Workflow helper functions<a class="anchor-link" href="#Workflow-helper-functions"> </a></h2>
</div>
</div>
</div>
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="github_token" class="doc_header"><code>github_token</code><a href="https://github.com/fastai/ghapi/tree/master/ghapi/actions.py#L115" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>github_token</code>()</p>
</blockquote>
<p>Get GitHub token from <code>GITHUB_TOKEN</code> env var if available, or from <code>github</code> context</p>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="actions_output" class="doc_header"><code>actions_output</code><a href="https://github.com/fastai/ghapi/tree/master/ghapi/actions.py#L120" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>actions_output</code>(<strong><code>name</code></strong>, <strong><code>value</code></strong>)</p>
</blockquote>
<p>Print the special GitHub Actions <code>::set-output</code> line for <code>name::value</code></p>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>Details in the <a href="https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-an-output-parameter">GitHub Documentation for <code>set-output</code></a>.</p>

</div>
</div>
</div>
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="actions_debug" class="doc_header"><code>actions_debug</code><a href="https://github.com/fastai/ghapi/tree/master/ghapi/actions.py#L125" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>actions_debug</code>(<strong><code>message</code></strong>)</p>
</blockquote>
<p>Print the special <code>::debug</code> line for <code>message</code></p>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>Details in the <a href="https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-a-debug-message">GitHub Documentation for <code>debug</code></a>. Note that you must create a secret named <code>ACTIONS_STEP_DEBUG</code> with the value true to see the debug messages set by this command in the log.</p>

</div>
</div>
</div>
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="actions_warn" class="doc_header"><code>actions_warn</code><a href="https://github.com/fastai/ghapi/tree/master/ghapi/actions.py#L130" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>actions_warn</code>(<strong><code>message</code></strong>, <strong><code>details</code></strong>=<em><code>''</code></em>)</p>
</blockquote>
<p>Print the special <code>::warning</code> line for <code>message</code></p>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>Details in the <a href="https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-a-warning-message">GitHub Documentation for <code>warning</code></a>. For the optional <code>details</code>, you can provide comma-delimited file, line, and column information, e.g.: <code>file=app.js,line=1,col=5</code>.</p>

</div>
</div>
</div>
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="actions_error" class="doc_header"><code>actions_error</code><a href="https://github.com/fastai/ghapi/tree/master/ghapi/actions.py#L135" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>actions_error</code>(<strong><code>message</code></strong>, <strong><code>details</code></strong>=<em><code>''</code></em>)</p>
</blockquote>
<p>Print the special <code>::error</code> line for <code>message</code></p>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>Details in the <a href="https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-an-error-message">GitHub Documentation for <code>error</code></a>. For the optional <code>details</code>, you can provide comma-delimited file, line, and column information, e.g.: <code>file=app.js,line=1,col=5</code>.</p>

</div>
</div>
</div>
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="actions_group" class="doc_header"><code>actions_group</code><a href="https://github.com/fastai/ghapi/tree/master/ghapi/actions.py#L140" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>actions_group</code>(<strong><code>title</code></strong>)</p>
</blockquote>
<p>Print the special <code>::group</code> line for <code>title</code></p>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="actions_endgroup" class="doc_header"><code>actions_endgroup</code><a href="https://github.com/fastai/ghapi/tree/master/ghapi/actions.py#L145" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>actions_endgroup</code>()</p>
</blockquote>
<p>Print the special <code>::endgroup</code></p>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>Details in the GitHub Documentation for <a href="https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#grouping-log-lines">grouping log lines</a>.</p>

</div>
</div>
</div>
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="actions_mask" class="doc_header"><code>actions_mask</code><a href="https://github.com/fastai/ghapi/tree/master/ghapi/actions.py#L150" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>actions_mask</code>(<strong><code>value</code></strong>)</p>
</blockquote>
<p>Print the special <code>::add-mask</code> line for <code>value</code></p>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>Details in the <a href="https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#masking-a-value-in-log">GitHub Documentation for <code>add-mask</code></a>.</p>

</div>
</div>
</div>
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="set_git_user" class="doc_header"><code>set_git_user</code><a href="https://github.com/fastai/ghapi/tree/master/ghapi/actions.py#L155" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>set_git_user</code>(<strong><code>api</code></strong>=<em><code>None</code></em>)</p>
</blockquote>
<p>Set git user name/email to authenticated user (if <code>api</code>) or GitHub Actions bot (otherwise)</p>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>When pushing to git from a workflow, you'll need to set your username and email address. You can set them to the <a href="/core.html#GhApi"><code>GhApi</code></a> authenticated user's details by passing <code>api</code>. Otherwise, <code>github-actions[bot]</code> and <code>github-actions[bot]@users.noreply.github.com</code> will be used, which will make a push appear to be from "GitHub Actions".</p>

</div>
</div>
</div>
</div>
 

