Skip to content

snapcrafters/ci

Repository files navigation

Snapcrafters CI

This repository contains common actions and tools used throughout the Snapcrafters organisation for the testing and delivery of our snaps.

Snapcrafters Actions

The actions in this repo are all used during the build, test and release of our snaps. Each of them listed below has it's own README

Usage

You can see examples of these actions in use in the following repos:

Contributing

If you'd like to contribute to this repository, please feel free to fork and create a pull request.

There are a few style guidelines to keep in mind:

  • Code should be linted using Prettier. You can achieve this with make lint and make format. The only requirements are npx and shellcheck.
  • When defining inputs/outputs in action.yaml, or listing them in the tables within README.md, they should be listed in alphabetical order for easy reading and updating.
  • Github Action inputs/outputs should be named all lowercase, separated by - where needed. The applies to inputs/outputs to actions themselves, and for individual steps within the actions. For example: snap-name or token.
  • Environment variables referring to repository level secrets and variables should be named all uppercase, and separated by _. For example: SNAPCRAFTERS_BOT_COMMIT.
  • Step/job level environment variables should be named all lowercase, and separated by _. For example: snap_name or yaml_path.
  • All bash variables should be quoted.
  • Scripts of all kinds, including those within actions run:| directives should follow the Google styleguide