With Sprinters fully set up, the final thing left to do is to tell GitHub to run your workflow jobs using Sprinters on AWS instead of GitHub hosted runners.
This is done by locating the runs-on
directive in your workflow yml and changing the label from
runs-on: ubuntu-latest
to
runs-on: sprinters:aws/ubuntu-latest
The easiest way to see this in action (and validate your Sprinters setup) is as follows.
Fork the sprinters-sh/sprinters-test
repository
In your fork, enable workflows under the Actions tab:
And run the sprinters-test
workflow:
GitHub Actions notifies Sprinters which in turn launches a fresh EC2 instance with a new runner in your AWS account.
After a few seconds the workflow will appear on GitHub and once it has completed you will see the success message:
The job now also appears in the Sprinters Console with all the details the EC2 instance that ran it:
Congratulations! You have just run your first GitHub Actions workflow job on your own AWS account.
Now it’s your turn. Migrate your workflow jobs over to Sprinters. Customize where they run, on what instance type they run and
how much temp storage they get by tweaking the runs-on:
label.