Skip to content

Collection of reusable GitHub Actions workflows

License

Notifications You must be signed in to change notification settings

oncoursesystems/workflows

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Reusable Workflows

Web Workflow CI/CD

The web workflow is designed to build and publish Docker images to a registry and deploy them to a Kubernetes cluster.

Quick Start

  1. Copy the files from the examples/web folder and put them in the repository's .github/workflows folder.
  2. For the PR preview workflows, copy the template yaml files from the examples/web/errata folder and put them in the repositories .github/workflows folder.
  3. For the PR preview workflows, you will need to base64 encode the kubeconfig file (typically in ~/.kube/config) and create an environment secret called KUBECONFIG_FILE with the contents.
  4. To release a new website version, use the create-release workflow. It should automatically create a GitHub release and a Docker image with the current timestamp as the tag.
  5. If the GitOps system is working properly, you should see a new PR created in the Devops repository. Merge the PR to deploy the new version to the cluster.
  6. Profit!

Actions

  • create-release (docs) - Creates a GitHub release and publishes a Docker image with the current timestamp as the tag
  • docker-build (docs) - builds a Docker image and pushes it to a registry
  • pr-preview-cleanup (docs) - Removes a PR preview deployment from the cluster when the PR is closed
  • pr-preview-deploy (docs) - Deploys a PR preview to the cluster when given the preview label
  • web-cd (docs) - Manages publishing a web application release
  • web-ci (docs) - Manages building of a web application during the development lifecycle

Mobile Workflow CI/CD

The mobile workflow is designed to publish code during all phases of development to make testing easier without having to dive into the developer workflow. It utilizes public actions created by Expo and Nearform.

Quick Start

  1. Copy the files from the examples/mobile folder and put them in the repository's .github/workflows folder.
  2. Install the optic-release-automation GitHub app to your organization (or selected repositories)
  3. In the package.json, ensure there is a version string property that follows semantic versioning, and a versionCode number property.
  4. In the release.yml workflow, make sure there is a build-command input in the optic-release-automation-action action that will increment the version code when run (we ended up using a node script that can be found in the examples folder).
  5. Add a repository secret EXPO_TOKEN that contains a token generated in EAS that has permission to the project.
  6. Profit

Actions

About

Collection of reusable GitHub Actions workflows

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks