Actions#
GitHub Actions
Action |
Description |
Workflow |
Status |
|---|---|---|---|
Build the code using the Address Sanitizer |
|||
Build the code and run some tests |
|||
Code Fuzzing |
|||
Static Code Checking |
|||
Code coverage tests |
|||
Static analysis of the code |
|||
Test all configure’s –debug-* options |
|||
Build a docker image to speed up automated builds |
|||
Build code docs |
|||
Do test builds on some Fedora releases |
|||
Test builds on macOS |
|||
Update the Translation Leaderboard |
|||
Check for unused functions |
Description#
GitHub Actions allow us automate lots of common tasks, such as:
Building the code
Testing the code
Unit tests
Static tests
Code Coverage
Deployment
Updating docs
Updating web pages
An Action is a YAML config file which can conditionally run commands and scripts.
It lives in the .github/workflows directory in a git repo.
Actions are triggered by GitHub events, e.g.
Pushing a commit to a branch
Creating or updating a pull-request
Scheduled, e.g. “Mondays at 3am”
See also:
Common Behaviour#
3rd-Party Actions#
NeoMutt’s Actions use several other published Actions.
Our most frequently used are:
GitHub’s checkout action – actions/checkout
Checkout the source codeHendrik Muhs’ ccache-action – hendrikmuhs/ccache-action
Cache the build products to speed up future builds
See also:
Docker#
Actions run in containers. These containers are empty.
If we want to build our code, then we need to install all the build tools.
We can do this, but it’s slow and creates a lot of network traffic.
To speed things up, we’ve created a Docker image that contains all the tools we’ll need.
See also:
Workflow Triggers#
Some actions can be triggered by workflow_dispatch, meaning they’re manual.
If the actions supports it…
Go to the log page
Select a branch using the “Run workflow” dropdown
Hit the “Run workflow” button

Deployment#
Many of NeoMutt’s Actions deploy their results.
Secrets and Tokens#
A basic Action, like build, doesn’t require any privileges.
It uses publicly available resources: a couple of repos.
However, many of the Actions require a token in order to write to repos, or upload to services such as Coverity.
For security, these tokens are encrypted and stored by GitHub. They are only decrypted when the Action needs them.
Using tokens means we don’t have to set up and install ssh keys.
Creating a Secret Token#
First, we create a Personal access token.
Personal Settings / Developer Settings
Generate a new token and set the permissions that the Action will require.
For the Translate Action, we’ve granted it:
[X]repo – Full control of repositories
This will display a token like: ghp_9BNi2SkEWkcXPHvOhR9Yqtzqs313Cekj56JP
Next, create the Secret.
We create a Repository secret – it can only be accessed by the neomutt repo.
Repository / Settings / Secrets
neomutt/neomutt
(Only NeoMutt admins will be able to follow this link)
New repository secret:
Name:
TEST_DEPLOY_KEYSecret:
ghp_9BNi2SkEWkcXPHvOhR9Yqtzqs313Cekj56JP
(from the instructions above)
Now, the Actions in the NeoMutt repo will be able to use ${{ secrets.TEST_DEPLOY_KEY }}
See also: