Skip to content
Marco Mambelli edited this page Jun 30, 2022 · 3 revisions

Here some notes on GitHub actions and how they are used in GlideinWMS.

GitHub can run Workflows that are composed of jobs which are a sequence of steps. Jobs are run independently on different runners (VMs); orchestration and service execution are possible. Each step is a process that executes some commands or one action, in the current runner or in a container (user-defined).

GitHub runs actions (Workflows) on VM based on the Ubuntu, Mac, or Windows OSes: https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners

Artifacts and caches can be used to pass data between jobs and different executions: https://github.com/actions/toolkit/tree/main/packages https://github.com/actions/download-artifact

act is a tool to run the actions locally.

There 2 difficult steps to getting act going:

  1. a bug where it is not finding the correct version of code/actions: https://github.com/nektos/act/pull/433 https://github.com/nektos/act/issues/311
  2. picking the docker image to use for the runner, something close to the one used by GitHub, with all the needed software installed and that can run the actions. The act provided one is not working (it does not have even git installed.

Here are workflow commands (set output, environment, ...) needed because steps are in different processes.

To use the REST API (e.g. from the browser, or curl so you can authenticate) and set a token:

Other links:

Clone this wiki locally