Skip to content

Github action runner notes

Akhil Kumar edited this page Sep 19, 2022 · 5 revisions

Overview

Every time we make a new stride in improving our build setup we learn 10's of lessons. The objective of this page is to register those notes in our social memory.

Learnings

  1. action runners allow reusing workflows to avoid duplication of yaml scripts and promote DRY. But still there are many pitfalls:
  • We want to use a single yaml script to perform multi-platform builds. But there are concepts which are not flexible. Consider or windows, linux and linux-docker reusable workflows. We have tried our best to use a single script by using "inputs" but that breaks the DRY principle because now we get repeated usage of "with" clause in the master script. A big missing gap is some ability to declare reusable variables in the caller workflow and pass them to the called workflow.
    • we acheived some of it by exploting the "default" value of inputs so we now have one file with defaults for windows and another for defaults with linux. this way the main difference between the 3 scripts linked above is just the defaul value for variables. On the flip-side it means that every change has to be mecahnically copied to 3 scripts now. It would be so nice if yaml framgments can be "included" into the file.

surprizes

  • It is suprising that env values can not be passed from caller workflow to called workflow this makes us repeat inputs
  • it is suprising that input values and defaults can not be expressions and only fixed values are allowed.