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.
It also 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 an expression: ${{ github.token }}
.
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.git.sha }}
tasks:
- key: code
call: mint/git-clone 1.4.0
with:
repository: https://github.com/YOUR_ORG/YOUR_REPO.git
ref: ${{ init.commit-sha }}
github-access-token: ${{ github.token }}
Next Steps
For continuing to build a graph of tasks on top of your code
task, see the CI reference workflow guide.