Running Campaigns with GitHub Actions and a Repo-Hosted State File
Last updated
Last updated
This lets you run a state evaluation without needing CLI access.
An active account on https://portal.resourcely.io/
An active list of guardrails in order to generate violations
A valid RESOURCELY_API_TOKEN
which can be obtained Generate API Token
A copy of state file in JSON format - You can find example state file in our scaffolding repo - link
A cloned copy of https://github.com/Resourcely-Inc/scaffolding-github-actions-campaigns.
To upload evaluation findings for a test state file, you can use the “Manually Triggered State Evaluation” Github action. This will block evaluations for any config root that has a campaign_config in the Resourcely yaml, so as to avoid polluting any active campaigns that target that config root.
To run an evaluation, then you will need to provide the fields that identify the state file and its associated parameters. Note that you can select a branch other than main, so there’s no need to merge state files into your repo.
A successful evaluation will write the generated findings into the backend. From there, you can interact with campaigns in all the normal ways in the UI. Subsequent state evaluations done through this specific method will update the metrics accordingly if there is a campaign that targets this repository.
Note: To avoid unexpected metrics, it’s best practices to delete any campaigns that are created against this kind of evaluation; metrics added from this cannot be selectively removed if you choose to fully set up campaign proxy evaluations for the config root in question.