GitHub Actions Example Using a GitHub Runner
GitHub Actions are a great way to automate, customize, and execute your software development workflows right in your repository.
To follow this tutorial, you will need:
Your Corellium API Token. If you haven't retrieved your API Token before, check out our Generating an API Token article.
main.js
from our Simple API Example article configured with your account credentials and project name.
Tutorial
- Create an empty GitHub repository for your runner to accept jobs from by following the steps in this GitHub Article.
- Add an "API_TOKEN" secret to your repository with a value of your API Token by following the steps in this GitHub Article.
Create a
.github/workflows
directory in your repository, then create a file namedgithub-actions-demo.yml
inside the.github/workflows
directory.Copy the Demo File contents below and paste them into the
github-actions-demo.yml
file.
name: Simpledemo
on: [workflow_dispatch]
jobs:
Build:
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/checkout@v1
- name: Install Corellium Api
run: npm install @corellium/corellium-api
- name: Run example
run: node main.js
Clone the device_example folder from https://github.com/corellium/corellium-api/tree/master/examples/device_example into the repository you just made.
In your repository, click Actions.
- Click the workflow you would like to run on the left, then click Run workflow
- Select Run workflow. The workflow should appear and begin running.
- Click on the name of the workflow to see the jobs.
- Click the name of the job to see the steps.
- Now, you can expand each step to see the output.
Next Steps
Check out our article on the Simple API Example article we used in this GitHub actions demo for information on how to configure it to run on your Corellium account.