Skip to content

GEWIS/actions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛠 Actions

CI Latest Release License

Common and Reusable GitHub Actions for the GEWIS organization.

Note

All inputs for the workflows should be provided as strings. However, sometimes a certain structure is expected. These are noted in the "Options" columns.

Lint and build

Workflow for linting, formatting, testing and building projects. Can be used for both npm and yarn.

jobs:
  build-and-lint-yarn:
    uses: GEWIS/actions/.github/workflows/lint-and-build-npm.yml@v1
    with:
      node-version: '22.x'
      format: true

  build-and-lint-npm:
    uses: GEWIS/actions/.github/workflows/lint-and-build-yarn.yml@v1
    with:
      node-version: '20.x'
      test: true

Inputs

Input name Description Required Options Default value
working-directory The directory where the project is located. .
node-version The version of Node.js to use. 18.x, 20.x, 22.x 20.x
artifact-name The name of the artifact to use.
artifact-path The path where the artifact should be stored.
prepare-command The command to run before building (and and after checkout).
cleanup-command The command to run after building.
lint Whether to lint the project. true, false true
format Whether to format the project. true, false false
test Whether to run tests. true, false false
build Whether to build the project. true, false true

Docker build

Workflow for building a docker image. Useful for, for example, testing if a container build succeeds on a develop branch.

jobs:
  dockerize:
    uses: GEWIS/actions/.github/workflows/docker-build.yml@v1
    with:
      projects: '["."]'

Inputs

Input name Description Required Options Default value
projects Comma-separated list of projects to release.

Docker release

Workflow for building Docker images and releasing them. Can be used to push to GitHub and any other registry.

jobs:
  build-and-lint:
    uses: GEWIS/actions/.github/workflows/docker-release.yml@v1
    with:
      projects: '["."]'
      docker-registry: 'abc.docker-registry.gewis.nl'
      docker-path: 'nc/aurora/core'
      version: '4.0.40'
      github-registry: 'true'

Inputs

Input name Description Required Options Default value
projects Comma-separated list of projects to release.
version Version of the Docker release.
docker-registry The docker registry to push the build image to.
github-registry Whether to push the image to the GitHub registry. true, false false
env-file Contents of the environment file to use during building.
docker-paths The docker namespace, project and image name to push to.

Secrets

Secret name Secret value
REGISTRY_USERNAME The username used to push to the custom registry.
REGISTRY_PASSWORD The password used to push to the custom registry.

NPM release

Workflow for releasing a NPM package on npmjs.com.

jobs:
  build-and-lint:
    uses: GEWIS/actions/.github/workflows/npm-release.yml@v1
    with:
      version: '4.0.40'
      lerna: 'true'

Inputs

Input name Description Required Options Default value
node-version The version of Node.js to use. 18.x, 20.x, 22.x 20.x
version Version of the NPM release.
lerna Whether the project is a lerna project. true, false false

Secrets

Secret name Description Required
NPM_TOKEN The token used to publish to npmjs.com.

Versioning

Workflow for versioning a project using semantic-release-action.

jobs:
  build-and-lint:
    uses: GEWIS/actions/.github/workflows/versioning.yml@v1

Inputs

Input name Description Required Options Default value
dry-run Whether to run a dry run of the semantic versioning. string .

Outputs

Output name Description Options Default value
next-version The next semantic version of the project. string ""

Examples

Example workflows for building, versioning and releasing a project can be found in the examples directory.