Skip to content

Commit

Permalink
Fix docker repo name
Browse files Browse the repository at this point in the history
  • Loading branch information
alexerm committed Jun 23, 2024
1 parent 7520f81 commit 7358d52
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions images/ubuntu/templates/ubuntu-22.04.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,9 @@ variable "vm_size" {
default = "Standard_D4s_v4"
}

variable "github_org" {
type = string
default = "${split("/", env("GITHUB_REPOSITORY"))[0]}"
}

variable "github_repo" {
type = string
default = "${split("/", env("GITHUB_REPOSITORY"))[1]}"
default = "${env("GITHUB_REPOSITORY")}"
}


Expand All @@ -164,15 +159,15 @@ build {
sources = ["source.docker.ubuntu"]

post-processor "docker-tag" {
repository = "ghcr.io/${var.github_org}/${var.github_repo}"
repository = "ghcr.io/${var.github_repo}"
tags = ["ubuntu-22.04-latest", "ubuntu-22.04-nightly-${formatdate("YYYYMMDD", timestamp())}"]
}

provisioner "shell" {
execute_command = "sh -c '{{ .Vars }} {{ .Path }}'"
inline = ["apt update", "apt install -y sudo lsb-release wget apt-utils"]
}

provisioner "shell" {
inline = [
"echo 'Build completed successfully'",
Expand Down

0 comments on commit 7358d52

Please sign in to comment.