Skip to content
/ ci Public

Continuous intergration automation for CTF Pilot

License

Notifications You must be signed in to change notification settings

ctfpilot/ci

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

CTF Pilot's CI

Important

This CI repository is meant for internal usage within the CTFPilot organization.

This repository contains Continuous intergration automation, in the forms of GitHub Action workflows.

How to use

To use the reusable workflows, use the following template to use:

name: <name>

on:
  <triggers>

jobs:
  <job>:
    permissions:
      <permissions>
    name: <name>
    uses: ctfpilot/ci/.github/workflows/<workflow>.yml@<version>
    with:
      <inputs>

Workflows

CLA Assistant

This workflow contains the CLA Assistant bot used throughout CTF Pilot.

It is setup to contain sensible defaults, but requires the repository input to be specified.

The workflow can only be run within the ctfpilot organization.

Inputs

  • repository: The repository that the CLA is generated for. Example hello-world.
  • version: CLA version. Keep default to use organization default.
  • CLASHA: The SHA for the commit, the CLA version is. Keep default to use organization default.

Secrets

  • CLA_ASSISTANT_PAT: CLA Repository Access Token. Required in order to push signatures to the CLA repository.

How to use

name: "CLA Assistant"

on:
  issue_comment:
    types: [created]
  pull_request_target:
    types: [opened, closed, synchronize]

jobs:
  CLAAssistant:
    permissions:
      actions: write
      contents: read
      pull-requests: write
      statuses: write
    name: "CLA Assistant"
    uses: ctfpilot/ci/.github/workflows/cla-assistant.yml@<version>
    secrets: inherit
    with:
      repository: <repository>

Release

This workflow contains the release system used throughout CTF Pilot.

The workflow requires the repository input to be specified.

When the workflow runs on a push to develop, it will fail if main is ahead of develop.

Inputs

  • repository: Allowed repository for workflow to run in. Example ctfpilot/hello-world.
  • plugins: Additional plugins to install. Example @semantic-release/changelog @semantic-release/git
  • ENVIRONMENT: The environment to deploy to.

Secrets

  • RELEASE_GH_TOKEN: GitHub Token. Used to authenticate with GitHub at release step. This will overwrite the use of the default GitHub token.
  • BUILD_GH_TOKEN: GitHub Token. Used to authenticate with GitHub at build step. This will overwrite the use of the default GitHub token.
  • PYPI_TOKEN: PyPI Token. Used to authenticate with PyPI at release step if present.

Outputs

  • version: The version of the release. Will be null if no release was made.

How to use

name: "Release"

on:
  push:
    branches:
      - main
      - develop

jobs:
  CLAAssistant:
    permissions:
      contents: write
      packages: write
      id-token: write
    name: "Release"
    uses: ctfpilot/ci/.github/workflows/release.yml@<version>
    with:
      repository: <repository>

Docker

This workflow contains the Docker build and push system used throughout CTF Pilot.

The workflow requires the repository input to be specified.

Inputs

  • repository: Allowed repository for workflow to run in. Example ctfpilot/hello-world.
  • dockerfile: Dockerfile path.
  • context: Build context.
  • arguments: Build arguments. List of key-value pairs.
  • semver: Semantic version. Leave empty to not use semantic versioning.
  • tags: List of tags to apply to the image. Required if you do not use semantic versioning.
  • registry: Registry for docker image to use. Defaults to GitHub container registry.
  • image_name: Docker image name to use. Defaults to repository name.
  • registry_username: Username to use for registry login. Defaults to GitHub actor.
  • registry_token: Token to use for registry login. Defaults to GITHUB_TOKEN.
  • fetch_submodules: Fetch submodules. Defaults to true.
  • platforms: Platforms to build for (comma separated, e.g., linux/amd64,linux/arm64).
  • runner: Runner to use for the job. Defaults to ubuntu-latest
  • cacheFrom: Cache type from
  • cacheTo: Cache type to
  • commit: Commit SHA to use for git operations and tagging. Defaults to github.sha.

How to use

name: "Docker build and push"

on:
  push:
    branches:
      - main
      - develop

jobs:
  CLAAssistant:
    permissions:
      contents: read
      packages: write
      id-token: write
    name: "Docker build and push"
    uses: ctfpilot/ci/.github/workflows/docker.yml@<version>
    with:
      repository: <repository>

Contributing

We welcome contributions of all kinds, from code and documentation to bug reports and feedback!

Please check the Contribution Guidelines (CONTRIBUTING.md) for detailed guidelines on how to contribute.

To maintain the ability to distribute contributions across all our licensing models, all code contributions require signing a Contributor License Agreement (CLA). You can review the CLA here. CLA signing happens automatically when you create your first pull request.
To administrate the CLA signing process, we are using CLA assistant lite.

A copy of the CLA document is also included in this repository as CLA.md.
Signatures are stored in the cla repository.

License

This repository is licensed under the EUPL-1.2 License.
You can find the full license in the LICENSE file.

We encourage all modifications and contributions to be shared back with the community, for example through pull requests to this repository.
We also encourage all derivative works to be publicly available under the EUPL-1.2 License.
At all times must the license terms be followed.

For information regarding how to contribute, see the contributing section above.

CTF Pilot is owned and maintained by The0Mikkel.
Required Notice: Copyright Mikkel Albrechtsen (https://themikkel.dk)

Code of Conduct

We expect all contributors to adhere to our Code of Conduct to ensure a welcoming and inclusive environment for all.

About

Continuous intergration automation for CTF Pilot

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •