1
1
mirror of https://github.com/tweag/nickel.git synced 2024-09-19 07:28:22 +03:00
nickel/infra/github-variables.ncl
Viktor Kleen 0dd1e10863
Add infrastructure for on-demand ARM64 runners on AWS (#1569)
* Add infrastructure for on-demand ARM64 runners on AWS

With this change, ARM64 release artifacts will be built automatically by
a GitHub workflow. Since GitHub doesn't offer hosted runners running on
ARM64, we're spinning up an EC2 spot instance on demand and run the jobs
building ARM64 artifacts there.

As a fun side note, the Terraform infrastructure code is written
entirely in Nickel.

* Remove unused `update-github` script

* Address comments from code review

* Address comments from code review
2023-09-04 15:41:23 +00:00

38 lines
855 B
Plaintext

{
region | String,
github
| {
owner | String,
repo | String,
ec2_role | String,
ec2_start | String,
ec2_stop | String,
..
},
config = {
resource.github_actions_variable."ec2_region" = {
repository = "%{github.repo}",
variable_name = "EC2_REGION",
value = region,
},
resource.github_actions_secret."ec2_role" = {
repository = "%{github.repo}",
secret_name = "EC2_ROLE",
plaintext_value = github.ec2_role,
},
resource.github_actions_secret."ec2_start" = {
repository = "%{github.repo}",
secret_name = "EC2_START",
plaintext_value = github.ec2_start,
},
resource.github_actions_secret."ec2_stop" = {
repository = "%{github.repo}",
secret_name = "EC2_STOP",
plaintext_value = github.ec2_stop,
},
}
}