Docs
relyance.ai ↗
Browse docs

GitHub Actions

Updated October 13, 2025View as Markdown ↗

GithubActionsLogo.png GitHub Actions is a continuous integration and continuous delivery (CI/CD) platform that allows you to automate your build, test, and deployment pipeline. You can create workflows that build and test every pull request to your repository, or deploy merged pull requests to production.

This how-to will provide a basic understanding of how add the Relyance Source Code inspector (SCI) into a typical build job.

Prerequisites:

  1. A source code repository needs to be available.
  2. The relyance.yaml file needs to be in the source code root directory.
  3. Follow Set up SCI to create an OAuth credential and copy the Docker command from Step 2. Set the Actions repository variable SCI_IMAGE to the full image reference shown at the end of that command.
Tip

See more info about the SCI commands here.

Steps:

  1. Login to your GitHub account.
  2. Navigate to the main page of the repository.
  3. Ensure your source code repository has the preconfigured relyance.yaml file in the root path of your source code.
  4. Create a secret in Github:
    1. Click on the Settings tab in the repo header.
    2. Click on Secrets and variables> Actions.
    3. Create a New repository secret.
    4. Set the name to RELYANCE_API_KEY and paste the full API_KEY value you copied when you created the OAuth credential.
  5. Navigate to the main page of the repository.
  6. In the header tabs, click Actions.
  7. Click on the set up a workflow yourself link (or create a new workflow under .github/workflows/).
  8. Using the template below, update the workflow:
name: Relyance SCI Scan

on:
  #TODO: Modify the cron job schedule below.
  schedule:
    - cron: "0 20 * * *"
  workflow_dispatch:

jobs:
  #TODO: Modify the job names and the machine below if you would like.
  execute-relyance-sci:
    name: Relyance SCI Job
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Run SCI
        env:
          API_KEY: ${{ secrets.RELYANCE_API_KEY }}
          SCI_IMAGE: ${{ vars.SCI_IMAGE }}
        run: |-
          docker run --pull=always --rm --env API_KEY --volume "$PWD:/repo:ro" "$SCI_IMAGE"

Note: The workflow_dispatch command allows you to manually run the SCI scan, this can be removed. 9. Commit changes. 10. This job will now run according to the scheduled CRON job in GitHub actions.
GitHubActions-1.png

If you wish to run the action manually and have the workflow_dispatch command in the Action file:

  1. Go back to the Actions tab after you've committed the file.
  2. In the left-side menu click the Relyance SCI Scan link.
  3. Click the Run workflow button and run the workflow.
  4. Once complete, you should see:
  5. If there are no errors, you should start to see SCI results in your Relyance tenant.

Appendix:

Run the command from the repository root with the scan job's API_KEY environment variable and the image from Step 2.

docker run --pull=always --rm --env API_KEY --volume "$PWD:/repo:ro" "$SCI_IMAGE"