Mint Quickstart with GitHub

If you're not already familiar with Mint, you may want to start with the general getting started guide.

Install the Mint GitHub App

Install the Mint GitHub App:

https://github.com/apps/rwx-mint

This gives Mint access to read your repository contents, which is necessary to read the run definitions in your .mint directory. In addition, it gives Mint access to a few other permissions which are necessary to trigger your runs via webhooks and report statuses.

Testing the GitHub App Installation

Run Definition

To test the GitHub app installation and Mint integration, create a file named .mint/push.yml, commit, and push it to your repository.

on:
  github:
    push:

tasks:
  - key: hello-world
    run: echo hello world

GitHub Status Check

Take a look at the commit you just pushed in the GitHub UI; it should have a status associated with it from Mint. If you click the details link, it'll take you to the Mint UI where you can see the hello-world task.

Cloning Repositories

Installing the GitHub App also provides a way to clone your repositories. Mint provides a GitHub Access Token via a vault secret.

Look in your default vault:

https://cloud.rwx.com/mint/deep_link/vaults

You should see a secret named "*_CLONE_TOKEN where * is your GitHub organization in all uppercase.

You can use this token with the mint/git-clone leaf to clone your repository.

To test cloning, update .mint/push.yml to contain the following, and then commit and push.

on:
  github:
    push:
      init:
        commit-sha: ${{ event.github.push.head_commit.id }}

tasks:
  - key: code
    call: mint/git-clone 1.2.2
    with:
      repository: https:://github.com/YOUR_ORG/YOUR_REPO.git
      ref: ${{ init.commit-sha }}
      github-access-token: ${{ secrets.YOUR_ORG_CLONE_TOKEN }}

Next Steps

For continuing to build a graph of tasks on top of your code task, see the CI reference workflow guide.