Skip to content

Commit

Permalink
chore: set up more required vars
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Rose committed Oct 8, 2024
1 parent a65394a commit a7cf05e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ami-release-nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
packer init stage2-nix-psql.pkr.hcl
GIT_SHA=${{github.sha}}
POSTGRES_MAJOR_VERSION=${{ env.POSTGRES_MAJOR_VERSION }}
packer build -var "git_sha=${GIT_SHA}" -var "git-head-version=${GIT_SHA}" -var "packer-execution-id=${GITHUB_RUN_ID}" -var-file="development-arm.vars.pkr.hcl" -var-file="common-nix.vars.pkr.hcl" stage2-nix-psql.pkr.hcl
packer build -var "git_sha=${GIT_SHA}" -var "git-head-version=${GIT_SHA}" -var "packer-execution-id=${GITHUB_RUN_ID}" -var "postgres_major_version=${POSTGRES_MAJOR_VERSION}" -var-file="development-arm.vars.pkr.hcl" -var-file="common-nix.vars.pkr.hcl" stage2-nix-psql.pkr.hcl
- name: Grab release version
id: process_release_version
Expand Down
8 changes: 7 additions & 1 deletion stage2-nix-psql.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ variable "git_sha" {
default = env("GIT_SHA")
}

variable "postgres_major_version" {
type = string
default = ""
}

packer {
required_plugins {
amazon = {
Expand Down Expand Up @@ -133,7 +138,8 @@ build {

provisioner "shell" {
environment_vars = [
"GIT_SHA=${var.git_sha}"
"GIT_SHA=${var.git_sha}",
"POSTGRES_MAJOR_VERSION=${var.postgres_major_version}"
]
script = "scripts/nix-provision.sh"
}
Expand Down

0 comments on commit a7cf05e

Please sign in to comment.