diff --git a/README.md b/README.md index 624a7b5..4886618 100644 --- a/README.md +++ b/README.md @@ -7,16 +7,86 @@ This repository contains shared CI/CD actions for all labs products, including t - Django: build and publish - Docker Publish - Deployment: generate manifests and deploy to Kubernetes -- Labs Application: consolidated build, publish, and deploy for standard React-Django labs applications ## Usage To use shared actions, add the following to your workflow file: ```yaml -- uses: pennlabs/shared-actions/.github/workflows/[workflow-name].yaml@main +- uses: pennlabs/shared-actions/.github/workflows/[workflow-name].yaml@[version tag] with: [parameter]: [value] ``` +Specifically, use each job as follows: + +### django-check +```yaml + name: "" + uses: pennlabs/shared-actions/.github/workflows/django-check.yaml@v0.1 + with: + projectName: + path: , root directory (.) by default> + flake: , whether to use flake linting> + black: , whether to run black on all python files> + +``` + +### react-check +```yaml + name: "" + uses: pennlabs/shared-actions/.github/workflows/react-check.yaml@v0.1 + with: + path: , root directory (.) by default> + +``` + +### docker-publish +```yaml + name: "" + uses: pennlabs/shared-actions/.github/workflows/docker-publish.yaml@v0.1 + with: + # Inputs + imageName: "" + githubRef: ${{ github.ref }} + gitSha: ${{ github.sha }} + + # Optional inputs + + # Path to the docker context + path: backend + + # Path to the dockerfile (relative to `path` variable) + dockerfile: + + # If enabled, will cache_from the latest version of the docker image. + cache: , + + secrets: + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + + needs: backend-check +``` + +### deployment +```yaml + deploy: + name: "Deploy" + uses: pennlabs/shared-actions/.github/workflows/deployment.yaml@v0.1.1j + + with: + githubRef: ${{ github.ref }} + gitSha: ${{ github.sha }} + + secrets: + AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }} + GH_AWS_ACCESS_KEY_ID: ${{ secrets.GH_AWS_ACCESS_KEY_ID }} + GH_AWS_SECRET_ACCESS_KEY: ${{ secrets.GH_AWS_SECRET_ACCESS_KEY }} + + needs: + - + - +``` + > NOTE: Information such as githubRefs, environment variables, and secrets must be passed into the shared action as inputs.