<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Michal Moczulski</title>
    <description>The latest articles on Forem by Michal Moczulski (@mrmike).</description>
    <link>https://forem.com/mrmike</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F438053%2Fd6084277-a00f-40fb-81c9-78f4695491a0.jpeg</url>
      <title>Forem: Michal Moczulski</title>
      <link>https://forem.com/mrmike</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/mrmike"/>
    <language>en</language>
    <item>
      <title>Github Action - handling input default value</title>
      <dc:creator>Michal Moczulski</dc:creator>
      <pubDate>Thu, 06 Jan 2022 20:45:14 +0000</pubDate>
      <link>https://forem.com/mrmike/github-action-handling-input-default-value-5f2g</link>
      <guid>https://forem.com/mrmike/github-action-handling-input-default-value-5f2g</guid>
      <description>&lt;p&gt;Today I want to share a recently learned technique for handling input default value for automatically triggered actions.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;workflow_dispatch&lt;/code&gt; trigger
&lt;/h3&gt;

&lt;p&gt;Github Action offers the way to parametrize your action when you're using &lt;code&gt;workflow_dispatch&lt;/code&gt; to manually trigger the action. &lt;/p&gt;

&lt;p&gt;Let's say we have simple greeting action&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;

&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Greeting Action&lt;/span&gt;
&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;workflow_dispatch&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;inputs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;default&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Octocat"&lt;/span&gt;
        &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Name&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;to&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;greet"&lt;/span&gt;
&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;say-hello&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;
    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;echo "Hello ${{ github.event.inputs.name }}"&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;It allows you to run action with a custom name parameter. From the Github UI perspective, it looks like this&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbll2d4sj4bwt2xfwwcoz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbll2d4sj4bwt2xfwwcoz.png" alt="Workflow dispatch"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It works in a very simple way. Passed name or default value can be accessed with &lt;code&gt;${{ github.event.inputs.name }}&lt;/code&gt;. But the problem is that this input will be only available for jobs triggered with &lt;code&gt;workflow_dispatch&lt;/code&gt; event.&lt;/p&gt;

&lt;h3&gt;
  
  
  Different types of triggers
&lt;/h3&gt;

&lt;p&gt;As you probably know, a single action can have more triggers than just &lt;code&gt;workflow_dispatch&lt;/code&gt;. For example, your action can be triggered with &lt;code&gt;push&lt;/code&gt; event or &lt;code&gt;scheduled&lt;/code&gt; with cron.&lt;/p&gt;

&lt;p&gt;Initially, I thought that the default value of the input parameter will be used but this is not true. The action triggered with non &lt;code&gt;workflow_dispatch&lt;/code&gt; event doesn't have access to inputs. This may produce subtle bugs when your action calls &lt;code&gt;${{ github.event.inputs.&amp;lt;key&amp;gt; }}&lt;/code&gt;. &lt;strong&gt;Watch out for this&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Shell Parameter Expansion to the rescue
&lt;/h3&gt;

&lt;p&gt;I found parameter expansion technique particularly useful in solving this problem.&lt;/p&gt;

&lt;p&gt;Without going much into details, you can think of parameter expansion as a way to provide a default value when a parameter is unset or null (but it's more than that - &lt;a href="https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html" rel="noopener noreferrer"&gt;more details&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;A Simple Bash example&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="c"&gt;# let's define empty VAL parameter&lt;/span&gt;
~&lt;span class="nv"&gt;$ VAL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;
~&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;VAL&lt;/span&gt;&lt;span class="k"&gt;:-&lt;/span&gt;&lt;span class="s2"&gt;"default"&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt; &lt;span class="c"&gt;# we use parameter expansion here&lt;/span&gt;
default &lt;span class="c"&gt;# since VAL is empty "default" is printed&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Solution
&lt;/h3&gt;

&lt;p&gt;Knowing how parameter expansion works, let's see how to use it to solve the problem.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;

&lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
   &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
     &lt;span class="s"&gt;USER_INPUT=${{ github.event.inputs.name }}&lt;/span&gt;
     &lt;span class="s"&gt;# Use user input or fall back to "Octocat"&lt;/span&gt;
     &lt;span class="s"&gt;NAME=${USER_INPUT:-"Octocat"}&lt;/span&gt;
     &lt;span class="s"&gt;# use $NAME in your action, value will be always provided&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;When your action is triggered with &lt;code&gt;workflow_dispatch&lt;/code&gt; event &lt;code&gt;NAME&lt;/code&gt; value will be equal to the value provided by the user. In other cases, it will fall back to &lt;code&gt;"Octocat"&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If I want to use input value across different steps I usually create separate step for exporting my input value.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;

&lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Set name output&lt;/span&gt;
        &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;name&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
          &lt;span class="s"&gt;USER_INPUT=${{ github.event.inputs.name }}&lt;/span&gt;
          &lt;span class="s"&gt;echo "::set-output name=value::${USER_INPUT:-"Octocat"}"&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Use output&lt;/span&gt;
        &lt;span class="c1"&gt;# Now I can access my parameter in a similar fashion to github.events.inputs.name&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;echo "Hello ${{ steps.name.outputs.value}}"&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This strategy allows me to create and maintain a single action with different triggers.&lt;/p&gt;

</description>
      <category>github</category>
      <category>todayilearned</category>
    </item>
    <item>
      <title>How I use Android Studio - my tips and tricks</title>
      <dc:creator>Michal Moczulski</dc:creator>
      <pubDate>Tue, 21 Dec 2021 16:48:11 +0000</pubDate>
      <link>https://forem.com/mrmike/how-i-use-android-studio-my-tips-and-tricks-4dm2</link>
      <guid>https://forem.com/mrmike/how-i-use-android-studio-my-tips-and-tricks-4dm2</guid>
      <description>&lt;p&gt;I like to read posts and articles about tricks for Android Studio cause you can learn so many new things. For me, it's fascinating to see how people can optimize working with Android Studio in so many different ways.&lt;/p&gt;

&lt;p&gt;Today I want to share 5 tricks I use every day working with Android Studio.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tip #1 - I don't use tabs
&lt;/h3&gt;

&lt;p&gt;Without using tabs in Android Studio I feel like I can focus more easily cause I work on one file at a time. When I need to work with two or more files at the same time (e.g. implementation and test files) I simply split the screen.&lt;/p&gt;

&lt;p&gt;To disable tabs simply go to &lt;code&gt;Preferences &amp;gt; Editor &amp;gt; General &amp;gt; Editor Tabs&lt;/code&gt; and&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;set &lt;code&gt;Tab placement&lt;/code&gt; to None&lt;/li&gt;
&lt;li&gt;set &lt;code&gt;Tab limit&lt;/code&gt; to 1&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flgk5ip4e21vt8mk2gn3f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flgk5ip4e21vt8mk2gn3f.png" alt="Editor tabs settings"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;How I navigate code without tabs?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;cmd/ctrl + e&lt;/code&gt; - to look for recently opened file&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cmd/ctrl + o&lt;/code&gt; - open class&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cmd/ctrl + f&lt;/code&gt; - open file&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cmd/ctrl + shift + a&lt;/code&gt; -&amp;gt; &lt;code&gt;split right&lt;/code&gt; - to split screen when I need to work with two or more files&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;option/alt + tab&lt;/code&gt; - to switch between splitted windows&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Tip #2 - disable design windows
&lt;/h3&gt;

&lt;p&gt;This tip is related to design windows whenever you work with XML or Compose layouts. When you open XML/Compose file Android Studio loads the design window along with the code. It can cause small lag which is annoying especially when you want to quickly skim the code. &lt;/p&gt;

&lt;p&gt;But the good thing is that you can easily disable it. Just go to &lt;code&gt;Preferences &amp;gt; Editor &amp;gt; Design Tools&lt;/code&gt; and set Code as default editor mode.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwxkrtmfyv3x4amv0ac7z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwxkrtmfyv3x4amv0ac7z.png" alt="Design tools settings"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now opening XML/Compose file should be faster.&lt;/p&gt;
&lt;h3&gt;
  
  
  Tip #3 - studio command
&lt;/h3&gt;

&lt;p&gt;Android Studio allows an easy way to create &lt;code&gt;studio&lt;/code&gt; command. Simply go to &lt;code&gt;Tools &amp;gt; Create studio launcher command&lt;/code&gt;. The command allows you to open the specific project directly within Android Studio. It's especially useful when you use the terminal a lot.&lt;/p&gt;

&lt;p&gt;Usage example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~$ git clone git@github.com:mrmike/Ok2Curl.git
~$ studio Ok2Curl # opens Ok2Curl with Android Studio
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or if you are already in the project directory simply call&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~$ studio .
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Tip #4 - find the file in the project structure
&lt;/h3&gt;

&lt;p&gt;I usually work with complex projects with many modules and thousands of files. Often I need to quickly localize the file in the project structure. To do that, I use &lt;code&gt;option/alt + F1&lt;/code&gt;, and then press 1 for selecting this file in the project structure. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fty8xsbts5i3yx91beqdr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fty8xsbts5i3yx91beqdr.png" alt="Select in window"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After that your file will be selected in the project window.  Additionally you can open file in the finder.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;option/alt + F1&lt;/code&gt; and then &lt;code&gt;1&lt;/code&gt; to select file in project view&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;option/alt + F1&lt;/code&gt; and then &lt;code&gt;8&lt;/code&gt; to select file in the finder&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cmd/ctrl&lt;/code&gt; + &lt;code&gt;-&lt;/code&gt; to collapse everything in the project view&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Tip #5 - everything is searchable
&lt;/h3&gt;

&lt;p&gt;In Android Studio (and basically in any JetBrains editor), almost every window is searchable. What does it mean? If you are in the active window you can simply start typing to find the best matching result. Let's look at the example.&lt;/p&gt;

&lt;p&gt;Imagine I've just opened recent file window (&lt;code&gt;cmd/ctrl + e&lt;/code&gt;) and I want to open &lt;code&gt;README.md&lt;/code&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhaqiin7cliqpz3pcya3s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhaqiin7cliqpz3pcya3s.png" alt="Recent files"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I can simply start typing &lt;code&gt;re&lt;/code&gt; to select file and click enter to open it.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fup37nz7n58u4t0r5l002.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fup37nz7n58u4t0r5l002.png" alt="Recent files - filtered"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It's a really simple trick but can save you many mouse clicks and the best part is it works almost everywhere :)&lt;/p&gt;

&lt;h3&gt;
  
  
  Summary
&lt;/h3&gt;

&lt;p&gt;I hope you'll find tricks useful and maybe you can incorporate some of them into your daily workflow. I'd love to hear from you what're your best tricks in Android Studio. You can leave a comment or ping me on Twitter at &lt;a href="https://twitter.com/moczul" rel="noopener noreferrer"&gt;@moczul&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>android</category>
      <category>productivity</category>
      <category>mobile</category>
    </item>
    <item>
      <title>🔊 Say Github - monitoring Github Workflow</title>
      <dc:creator>Michal Moczulski</dc:creator>
      <pubDate>Sun, 12 Dec 2021 18:17:36 +0000</pubDate>
      <link>https://forem.com/mrmike/say-github-monitoring-github-workflow-3jp1</link>
      <guid>https://forem.com/mrmike/say-github-monitoring-github-workflow-3jp1</guid>
      <description>&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Disclaimer: Presented solution applies to OS X but the general idea can be easily adjusted to other systems.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Recently I have found a great tool called &lt;a href="https://github.com/handstandsam/saydle"&gt;saydle&lt;/a&gt;. It's a simple Gradle wrapper that notifies you using &lt;code&gt;say&lt;/code&gt; command when your build is completed.&lt;/p&gt;

&lt;p&gt;I think it's a great example of improving everyday workflow with simple system command. I run many Android builds on daily basis using Github CI, so I've started thinking about similar solution for notifying me when my Github Workflow is completed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Solution - 1st approach
&lt;/h3&gt;

&lt;p&gt;After doing quick research, it turned out that I've already had all the necessary components to monitor Github Workflow. &lt;/p&gt;

&lt;p&gt;I used Github command line &lt;a href="https://cli.github.com/"&gt;tool&lt;/a&gt; to be notified when a workflow is completed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gh run watch &amp;lt;run-id&amp;gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; say &lt;span class="s2"&gt;"Workflow completed"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run id can be obtained directly from the workflow URL or the workflow list command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gh run list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  System notification - 2nd approach
&lt;/h3&gt;

&lt;p&gt;Going a step further I've thought that relying on sound maybe it's not the best option. I've decided to display system notification instead of using &lt;code&gt;say&lt;/code&gt; command. For displaying notification I used &lt;a href="https://github.com/julienXX/terminal-notifier"&gt;terminal-notifier&lt;/a&gt; tool which is pretty straightforward to use.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gh run watch &amp;lt;run-id&amp;gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; terminal-notifier &lt;span class="nt"&gt;-message&lt;/span&gt; &lt;span class="s1"&gt;'Workflow completed'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Clickable notification - my final approach
&lt;/h3&gt;

&lt;p&gt;At this moment I was pretty happy with my current solution but then I thought that clickable notification taking me directly to the Github Workflow result page would be even cooler. &lt;/p&gt;

&lt;p&gt;After checking that terminal-notifier supports URL parameter I created a simple script.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/usr/bin/env bash&lt;/span&gt;

&lt;span class="nv"&gt;WORKFLOW_ID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;
&lt;span class="nv"&gt;URL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;https://github.com/&amp;lt;USERNAME&amp;gt;/&amp;lt;PROJECT&amp;gt;/actions/runs/&lt;span class="nv"&gt;$WORKFLOW_ID&lt;/span&gt;
gh run watch &lt;span class="nv"&gt;$WORKFLOW_ID&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; terminal-notifier &lt;span class="nt"&gt;-message&lt;/span&gt; &lt;span class="s1"&gt;'Workflow completed'&lt;/span&gt; &lt;span class="nt"&gt;-open&lt;/span&gt; &lt;span class="nv"&gt;$URL&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Usage is simple:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./monitor-workflow &amp;lt;run-id&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After my workflow was completed I've got the notification:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---mah4X00--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p2kntrktrhk5zr0pi19y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---mah4X00--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p2kntrktrhk5zr0pi19y.png" alt="System notification" width="730" height="194"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And as expected, clicking it took me to the result page.&lt;/p&gt;

&lt;h3&gt;
  
  
  Summary
&lt;/h3&gt;

&lt;p&gt;It took me around 20 minutes to build the final version. It helps me save time every day while I'm waiting for my Android builds.&lt;/p&gt;

&lt;p&gt;Maybe this solution won't fit your needs, but I want to encourage you to create tools that work for you. Creating custom solutions with all the great tools out there is now simpler than ever before.&lt;/p&gt;

&lt;p&gt;Happy hacking :)&lt;/p&gt;

</description>
      <category>github</category>
      <category>productivity</category>
      <category>tooling</category>
      <category>android</category>
    </item>
  </channel>
</rss>
